]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
vsys: Avoid uninitialised variable warning
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 2 Mar 2013 10:42:27 +0000 (10:42 +0000)
committerStephan Wiesand <stephan.wiesand@desy.de>
Tue, 3 Jun 2014 16:41:18 +0000 (12:41 -0400)
Initialise the parms array to 0 so that we don't get warnings from
the compiler when we call syscall() using it.

Caught by coverity (#985949)

Reviewed-on: http://gerrit.openafs.org/9395
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit a666bfd67bd14028aac5eb49f1bf02576fb58405)

Change-Id: Ia777a33c1332fe9a1f00cc56be3980f0d50b69ea
Reviewed-on: http://gerrit.openafs.org/11044
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afsd/vsys.c

index 13a8ae67387b9f11022be3c5f441526f9e171ae4..44f428162615c1ee44dd7edf428fb8e92b60cfbb 100644 (file)
@@ -33,6 +33,8 @@ main(int argc, char **argv)
     afs_int32 parms[6];
     int numberFlag;
 
+    memset(&parms, 0, sizeof(parms));
+
     if (argc < 2) {
        printf("use: vsys <call number> <parms>\n");
        exit(1);