Print this page
6139 help gcc figure out variable initialization


 332                 rc = -2;
 333         }
 334         if (rc == -2) {
 335                 (void) pthread_mutex_lock(&log_mutex);
 336                 DPRINT((dbfp, "loadauditlist:  close / open audit.log(4)\n"));
 337                 if (open_log(listhead) == 0) {
 338                         openNewFile = 1;        /* try again later */
 339                 } else {
 340                         openNewFile = 0;
 341                 }
 342                 freedirlist(activeList);        /* old list */
 343                 activeList = listhead;          /* new list */
 344                 activeDir = startdir = thisdir;
 345                 activeCount = node_count;
 346                 (void) pthread_mutex_unlock(&log_mutex);
 347         } else {
 348                 freedirlist(listhead);
 349         }
 350 
 351         /* Get the minfree value. */
 352         if (minfreestr != NULL)
 353                 temp_minfree = atoi(minfreestr);
 354 
 355         if ((temp_minfree < 0) || (temp_minfree > 100))
 356                 temp_minfree = 0;
 357 
 358         if (minfree != temp_minfree) {
 359                 DPRINT((dbfp, "minfree:  old = %d, new = %d\n",
 360                     minfree, temp_minfree));
 361                 rc = -2;                /* data change */
 362                 minfree = temp_minfree;
 363         }
 364 
 365         return (rc);
 366 }
 367 
 368 /*
 369  * getauditdate - get the current time (GMT) and put it in the form
 370  *                yyyymmddHHMMSS .
 371  */
 372 static void




 332                 rc = -2;
 333         }
 334         if (rc == -2) {
 335                 (void) pthread_mutex_lock(&log_mutex);
 336                 DPRINT((dbfp, "loadauditlist:  close / open audit.log(4)\n"));
 337                 if (open_log(listhead) == 0) {
 338                         openNewFile = 1;        /* try again later */
 339                 } else {
 340                         openNewFile = 0;
 341                 }
 342                 freedirlist(activeList);        /* old list */
 343                 activeList = listhead;          /* new list */
 344                 activeDir = startdir = thisdir;
 345                 activeCount = node_count;
 346                 (void) pthread_mutex_unlock(&log_mutex);
 347         } else {
 348                 freedirlist(listhead);
 349         }
 350 
 351         /* Get the minfree value. */

 352         temp_minfree = atoi(minfreestr);
 353 
 354         if ((temp_minfree < 0) || (temp_minfree > 100))
 355                 temp_minfree = 0;
 356 
 357         if (minfree != temp_minfree) {
 358                 DPRINT((dbfp, "minfree:  old = %d, new = %d\n",
 359                     minfree, temp_minfree));
 360                 rc = -2;                /* data change */
 361                 minfree = temp_minfree;
 362         }
 363 
 364         return (rc);
 365 }
 366 
 367 /*
 368  * getauditdate - get the current time (GMT) and put it in the form
 369  *                yyyymmddHHMMSS .
 370  */
 371 static void