]> sourceware.org Git - lvm2.git/commitdiff
gcc: do not use return with void function
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 28 Aug 2020 17:33:49 +0000 (19:33 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 28 Aug 2020 19:43:03 +0000 (21:43 +0200)
Follow C norm and do not use 'return' in void function to call other
functions.

daemons/lvmlockd/lvmlockd-client.h
lib/label/hints.c
libdm/dm-tools/dmsetup.c
libdm/libdm-stats.c

index 62ffb732a27f0be8157405004d591114f58da75d..1d49dded8778c3aa2dc638d8a48beded0db3cc30 100644 (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);
 }
 
 /*
index fdc0bd6c04afffb193ee6f461101ada6742ebec1..3125ae01de4b3c6970bd8179dd38bb95c8b98b3c 100644 (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)
index d01b8f2e8ef3038eac2337636d27a17bb47b9d76..bf2762ae72565dc0d0f229816e1a898b2e0040d7 100644 (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;
        }
 }
 
index 05971bdad1aee79b9e7723aa4596c7ef5a0a32de..5379bed5ee6e05cb8f4c480c97451032855187fc 100644 (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;
This page took 0.046296 seconds and 5 git commands to generate.