C99 requires that objects with static linkage, which includes
global variables, be initialized to zero/NULL.
It is possible that old compilers required a hack of using one
explicit initializer and relying on the requirement from C99 that
the elements of the structure not listed in the initializer be
initialized as if it had static linkage. These incomplete initializers
seem to have been introduced to support old OS X compilers which
are not believed to still be in use.
Using a complete explicit initializer is undesired here, as the
rxkad statistics structures have a great number of elements and
the uuid structure is somewhat complicated.
Change-Id: Iefe7842cbf874252267cb3a8aee5d90ec2cab169
Reviewed-on: http://gerrit.openafs.org/11374
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
/* variable initialization for the benefit of darwin compiler; if it causes
problems elsewhere, conditionalize for darwin or fc_test compile breaks */
#ifdef AFS_PTHREAD_ENV
-struct rxkad_global_stats rxkad_global_stats = { 0 };
+struct rxkad_global_stats rxkad_global_stats;
pthread_mutex_t rxkad_global_stats_lock;
pthread_key_t rxkad_stats_key;
#else /* AFS_PTHREAD_ENV */
-struct rxkad_stats rxkad_stats = { { 0 } };
+struct rxkad_stats rxkad_stats;
#endif /* AFS_PTHREAD_ENV */
#ifdef AFS_PTHREAD_ENV
* +--------------------------...-----+
*/
-afsUUID afs_uuid_g_nil_uuid = { 0 };
+afsUUID afs_uuid_g_nil_uuid;
static uuid_time_t time_now, time_last;
static u_short uuid_time_adjust, clock_seq;
static afs_uint32 rand_m, rand_ia, rand_ib, rand_irand, uuid_init_done = 0;