From: Andrew Deason Date: Thu, 21 Apr 2011 22:10:13 +0000 (-0500) Subject: libafs: Initialize _settok_tokenCell primary flag X-Git-Tag: upstream/1.8.0_pre1^2~3836 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1b37cc8942e9b7c5072b2d4b2a1d4c9ff172e368;p=packages%2Fo%2Fopenafs.git libafs: Initialize _settok_tokenCell primary flag Always set the *primary flag to something in _settok_tokenCell. Otherwise, the lag may be unset, as it is not required to be initialized by all callers. Change-Id: I78c775f8cd70f74f6a344094a6a677cbc74f3281 Reviewed-on: http://gerrit.openafs.org/4521 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index 08d47f039..a8d81698e 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -1785,6 +1785,10 @@ _settok_tokenCell(char *cellName, int *cellNum, int *primary) { int t1; struct cell *cell; + if (primary) { + *primary = 0; + } + if (cellName && strlen(cellName) > 0) { cell = afs_GetCellByName(cellName, READ_LOCK); } else {