diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2010-10-25 12:57:00 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2010-10-25 12:57:00 +0000 |
commit | 30b36dc0e8c93e7c61efd8aadfa5c63d2cab77f8 (patch) | |
tree | 1c6602124d92026367e59499abd62c554a347154 /tools/lvm.c | |
parent | 0775e8060e8cdeb31b94756657c5de0bec0a5922 (diff) | |
download | lvm2-30b36dc0e8c93e7c61efd8aadfa5c63d2cab77f8.tar.gz lvm2-30b36dc0e8c93e7c61efd8aadfa5c63d2cab77f8.tar.xz lvm2-30b36dc0e8c93e7c61efd8aadfa5c63d2cab77f8.zip |
Fix potential NULL pointer dereference
Makes clang happier as it covers all code paths and avoids NULL pointer
dereference through the 'com' pointer (which is NULL by default static
initialisation).
Diffstat (limited to 'tools/lvm.c')
-rw-r--r-- | tools/lvm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/lvm.c b/tools/lvm.c index 60f9a79a..9cac23e1 100644 --- a/tools/lvm.c +++ b/tools/lvm.c @@ -85,11 +85,11 @@ static char *_list_args(const char *text, int state) break; } } - - if (!com) - return NULL; } + if (!com) + return NULL; + /* Short form arguments */ if (len < 3) { while (match_no < com->num_args) { |