Print this page
5910 libnisdb won't build with modern GCC

@@ -18,16 +18,15 @@
  *
  * CDDL HEADER END
  */
 
 /*
+ * Copyright 2015 Gary Mills
  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
 /*
  * DESCRIPTION: Contains code supporting the 'update in progress' flag. This is
  *              a near copy of lock flag code (in
  *              usr/src/cmd/ypcmd/shared/lockmp.c) If we implement a clean
  *              version of the locking code this file will probably disappear.

@@ -74,12 +73,12 @@
 
         /*
          * Initialize cross-process locks in memory-mapped file.
          */
         for (iiter = 0; iiter < MAXHASH; iiter++) {
-                if (rc = mutex_init(&(shmupdatearray->updatenode[iiter]),
-                    USYNC_PROCESS | LOCK_ROBUST, 0)) {
+                if ((rc = mutex_init(&(shmupdatearray->updatenode[iiter]),
+                    USYNC_PROCESS | LOCK_ROBUST, 0)) != 0) {
                         if (rc == EBUSY) {
                                 ebusy_cnt++;
                         } else {
                                 logmsg(MSG_NOTIMECHECK, LOG_ERR,
                                         "init_update_locks_mem():mutex_init():"