1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +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 - Version 2.02.91 -
=================================== ===================================
Switch int to void return for str_list_del() Switch int to void return for str_list_del().
Fix error path handling in _build_desc() Fix error path handling in _build_desc().
Add range test for device number in _scan_proc_dev(). Add range test for device number in _scan_proc_dev().
Use signed long for sysconf() call in cmirrord. Use signed long for sysconf() call in cmirrord.
Do not write in front of log buffer in print_log(). 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) if (vginfo && *vginfo->vgid)
dm_hash_remove(_vgid_hash, vginfo->vgid); dm_hash_remove(_vgid_hash, vginfo->vgid);
if (!vgid) { if (!vgid) {
/* FIXME: unreachable code path */
log_debug("lvmcache: %s: clearing VGID", info ? dev_name(info->dev) : vginfo->vgname); log_debug("lvmcache: %s: clearing VGID", info ? dev_name(info->dev) : vginfo->vgname);
return 1; 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) int validate_tag(const char *n)
{ {
register char c; register char c;
register int len = 0; /* int len = 0; */
if (!n || !*n) if (!n || !*n)
return 0; 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 != '/' if (!isalnum(c) && c != '.' && c != '_' && c != '-' && c != '+' && c != '/'
&& c != '=' && c != '!' && c != ':' && c != '&' && c != '#') && c != '=' && c != '!' && c != ':' && c != '&' && c != '#')
return 0; return 0;