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

gcc: do not use return with void function

Follow C norm and do not use 'return' in void function to call other
functions.
This commit is contained in:
Zdenek Kabelac 2020-08-28 19:33:49 +02:00
parent ee0cb17608
commit 19e9c88faf
4 changed files with 14 additions and 8 deletions

View File

@ -33,7 +33,7 @@ static inline daemon_handle lvmlockd_open(const char *sock)
static inline void lvmlockd_close(daemon_handle h)
{
return daemon_close(h);
daemon_close(h);
}
/*

View File

@ -354,7 +354,7 @@ void hints_exit(struct cmd_context *cmd)
free_hints(&cmd->hints);
if (_hints_fd == -1)
return;
return _unlock_hints(cmd);
_unlock_hints(cmd);
}
void free_hints(struct dm_list *hints)

View File

@ -6359,13 +6359,17 @@ static void _usage(FILE *out)
{
switch (_base_commands[_base_command].type) {
case DMSETUP_TYPE:
return _dmsetup_usage(out);
_dmsetup_usage(out);
break;
case LOSETUP_TYPE:
return _losetup_usage(out);
_losetup_usage(out);
break;
case STATS_TYPE:
return _stats_usage(out);
_stats_usage(out);
break;
case DEVMAP_NAME_TYPE:
return _devmap_name_usage(out);
_devmap_name_usage(out);
break;
}
}

View File

@ -1459,8 +1459,10 @@ static void _stats_walk_start(const struct dm_stats *dms, uint64_t *flags,
if (!dms->regions)
return;
if (!(*flags & (DM_STATS_WALK_AREA | DM_STATS_WALK_REGION)))
return _group_walk_start(dms, flags, cur_r, cur_a, cur_g);
if (!(*flags & (DM_STATS_WALK_AREA | DM_STATS_WALK_REGION))) {
_group_walk_start(dms, flags, cur_r, cur_a, cur_g);
return;
}
/* initialise cursor state */
*cur_a = 0;