Fix disk name initialization in scout
authorBenjamin Kaduk <kaduk@mit.edu>
Wed, 17 Sep 2014 16:07:02 +0000 (12:07 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 8 Oct 2014 21:30:52 +0000 (17:30 -0400)
commit57ca77786eb6c04519f9358f1456fdf5b8006757
treee7334f94e14d195604c16de48398b5285c5b0cfe
parent66a431bf82da5e09e89307c250991bfc12caf532
Fix disk name initialization in scout

Scout needs to initialize names in scout_disk structures to prevent
the use of uninitialized data.  However, '\0' is a NUL character
constant, i.e., the integer value 0, which is interpreted as NULL
(the pointer constant) in a pointer context, such as when assigned to
a variable of type char*.  Since the name field in these structs is
passed to printing routines, the safe initialization value is the
empty string constant "", not a zero value.

Change-Id: Ie0530fc4fc090b226c0e54201b4a74158efddebd
Reviewed-on: http://gerrit.openafs.org/11469
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/scout/scout.c