1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Some fixmes

'len' calculation is unused ?
Unreachable code could be removed or moved upward ?
This commit is contained in:
Zdenek Kabelac 2012-02-08 12:57:15 +00:00
parent 462835faa0
commit 9278655de1
3 changed files with 6 additions and 4 deletions

View File

@ -1,7 +1,7 @@
Version 2.02.91 -
===================================
Switch int to void return for str_list_del()
Fix error path handling in _build_desc()
Switch int to void return for str_list_del().
Fix error path handling in _build_desc().
Add range test for device number in _scan_proc_dev().
Use signed long for sysconf() call in cmirrord.
Do not write in front of log buffer in print_log().

View File

@ -987,6 +987,7 @@ static int _lvmcache_update_vgid(struct lvmcache_info *info,
if (vginfo && *vginfo->vgid)
dm_hash_remove(_vgid_hash, vginfo->vgid);
if (!vgid) {
/* FIXME: unreachable code path */
log_debug("lvmcache: %s: clearing VGID", info ? dev_name(info->dev) : vginfo->vgname);
return 1;
}

View File

@ -49,12 +49,13 @@ int emit_to_buffer(char **buffer, size_t *size, const char *fmt, ...)
int validate_tag(const char *n)
{
register char c;
register int len = 0;
/* int len = 0; */
if (!n || !*n)
return 0;
while ((len++, c = *n++))
/* FIXME: Is unlimited tag size support needed ? */
while ((/* len++, */ c = *n++))
if (!isalnum(c) && c != '.' && c != '_' && c != '-' && c != '+' && c != '/'
&& c != '=' && c != '!' && c != ':' && c != '&' && c != '#')
return 0;