]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
ubik-warning-cleanup-20011005
authorNathan Neulinger <nneul@umr.edu>
Fri, 5 Oct 2001 22:05:16 +0000 (22:05 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 5 Oct 2001 22:05:16 +0000 (22:05 +0000)
clean up warnings (mostly new headers or added parens) in ubik

src/ubik/beacon.c
src/ubik/disk.c
src/ubik/phys.c
src/ubik/recovery.c
src/ubik/remote.c
src/ubik/ubik.c
src/ubik/ubikcmd.c
src/ubik/utst_client.c
src/ubik/utst_server.c
src/ubik/vote.c

index 3fc756c62d66b713154201a60fb4e3b2a144587b..f039557c4ec4d5d37262682bb312a899a22ff266 100644 (file)
@@ -25,6 +25,13 @@ RCSID("$Header$");
 #endif
 #include <errno.h>
 #include <lock.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <rx/rx_multi.h>
@@ -50,6 +57,7 @@ int (*ubik_CRXSecurityProc)();
 char *ubik_CRXSecurityRock;
 afs_int32 ubikSecIndex;
 struct rx_securityClass     *ubikSecClass;
+static verifyInterfaceAddress();
 
 
 /* Module responsible for both deciding if we're currently the sync site,
@@ -170,7 +178,7 @@ ubeacon_InitServerListCommon(ame, info, clones, aservers)
     struct ubik_server *magicServer;
 
     /* verify that the addresses passed in are correct */
-    if (code = verifyInterfaceAddress(&ame, info, aservers))
+    if ((code = verifyInterfaceAddress(&ame, info, aservers)))
        return code;
 
     /* get the security index to use, if we can */
@@ -229,7 +237,7 @@ ubeacon_InitServerListCommon(ame, info, clones, aservers)
        }
     } else {
         i = 0;
-        while (servAddr = *aservers++) {
+        while ((servAddr = *aservers++)) {
            if (i >= MAXSERVERS) return UNHOSTS;            /* too many hosts */
            ts = (struct ubik_server *) malloc(sizeof(struct ubik_server));
            memset(ts, 0, sizeof(struct ubik_server));
index bf9785b9f20f82016ff70e11081899ba2de057df..a41aef44bbf2d4c910ebf4173a87dfa25bef29c8 100644 (file)
@@ -20,6 +20,13 @@ RCSID("$Header$");
 #include <netinet/in.h>
 #endif
 #include <errno.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #include <lock.h>
 #include <rx/xdr.h>
 
index 70f31c46b20294779c4a0bdb2d17478d54f5ed75..0fcaf8f564841bc39ddf46332ba6da67a67e4476 100644 (file)
@@ -25,6 +25,13 @@ RCSID("$Header$");
 #include <lwp.h>
 #include <lock.h>
 #include <errno.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 
 #define        UBIK_INTERNALS 1
 #include "ubik.h"
index b5d6409bd8e34f0b4cb3db97b307e195b46a1bbb..f4b0a40f27795ba1dbcb976f78b8f56365b3b82b 100644 (file)
@@ -23,6 +23,13 @@ RCSID("$Header$");
 #endif
 #include <assert.h>
 #include <lock.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <errno.h>
@@ -365,7 +372,7 @@ urecovery_Initialize(adbase)
  */
 urecovery_Interact() {
     afs_int32 code, tcode;
-    struct ubik_server *bestServer;
+    struct ubik_server *bestServer = NULL;
     struct ubik_server *ts;
     int dbok, doingRPC, now;
     afs_int32 lastProbeTime, lastDBVCheck;
index 6f0d9438e2352a927de221aafa587cb255f3d07d..bb5354a7b037fa99fff08a696569baeb78bfb15e 100644 (file)
@@ -19,6 +19,13 @@ RCSID("$Header$");
 #include <sys/file.h>
 #include <netinet/in.h>
 #endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #include <lock.h>
 #include <rx/xdr.h>
 #include <rx/rx.h>
@@ -58,7 +65,7 @@ SDISK_Begin(rxcall, atid)
 {
     register afs_int32 code;
 
-    if (code = ubik_CheckAuth(rxcall)) {
+    if ((code = ubik_CheckAuth(rxcall))) {
       return code;
     }
     DBHOLD(ubik_dbase);
@@ -87,7 +94,7 @@ SDISK_Commit(rxcall, atid)
     register afs_int32 code;
     register struct ubik_dbase *dbase;
     
-    if (code = ubik_CheckAuth(rxcall)) {
+    if ((code = ubik_CheckAuth(rxcall))) {
       return code;
     }
 
@@ -125,7 +132,7 @@ SDISK_ReleaseLocks(rxcall, atid)
     register struct ubik_dbase *dbase;
     register afs_int32 code;
 
-    if (code = ubik_CheckAuth(rxcall)) {
+    if ((code = ubik_CheckAuth(rxcall))) {
       return code;
     }
 
@@ -161,7 +168,7 @@ SDISK_Abort(rxcall, atid)
     register afs_int32 code;
     register struct ubik_dbase *dbase;
     
-    if (code = ubik_CheckAuth(rxcall)) {
+    if ((code = ubik_CheckAuth(rxcall))) {
       return code;
     }
 
@@ -200,7 +207,7 @@ SDISK_Lock(rxcall, atid, afile, apos, alen, atype)
     register struct ubik_dbase *dbase;
     struct ubik_trans *ubik_thisTrans;
 
-    if (code = ubik_CheckAuth(rxcall)) {
+    if ((code = ubik_CheckAuth(rxcall))) {
       return code;
     }
     if (!ubik_currentTrans) {
@@ -249,7 +256,7 @@ SDISK_WriteV(rxcall, atid, io_vector, io_buffer)
     struct ubik_iovec *iovec;
     char              *iobuf;
 
-    if (code = ubik_CheckAuth(rxcall)) {
+    if ((code = ubik_CheckAuth(rxcall))) {
       return code;
     }
     if (!ubik_currentTrans) {
@@ -296,7 +303,7 @@ SDISK_Write(rxcall, atid, afile, apos, adata)
     register afs_int32 code;
     register struct ubik_dbase *dbase;
 
-    if (code = ubik_CheckAuth(rxcall)) {
+    if ((code = ubik_CheckAuth(rxcall))) {
       return code;
     }
     if (!ubik_currentTrans) {
@@ -328,7 +335,7 @@ SDISK_Truncate(rxcall, atid, afile, alen)
     register afs_int32 code;
     register struct ubik_dbase *dbase;
 
-    if (code = ubik_CheckAuth(rxcall)) {
+    if ((code = ubik_CheckAuth(rxcall))) {
       return code;
     }
     if (!ubik_currentTrans) { 
@@ -357,7 +364,7 @@ SDISK_GetVersion(rxcall, aversion)
 {
     register afs_int32 code;
 
-    if (code = ubik_CheckAuth(rxcall)) {
+    if ((code = ubik_CheckAuth(rxcall))) {
       return code;
     }
 
@@ -401,7 +408,7 @@ SDISK_GetFile(rxcall, file, version)
     afs_int32 tlen;
     afs_int32 length;
     
-    if (code = ubik_CheckAuth(rxcall)) {
+    if ((code = ubik_CheckAuth(rxcall))) {
       return code;
     }
 /* temporarily disabled because it causes problems for migration tool.  Hey, it's just
@@ -463,7 +470,7 @@ SDISK_SendFile(rxcall, file, length, avers)
 
     /* send the file back to the requester */
     
-    if (code = ubik_CheckAuth(rxcall)) {
+    if ((code = ubik_CheckAuth(rxcall))) {
       goto failed;
     }
 
@@ -640,7 +647,7 @@ SDISK_SetVersion(rxcall, atid, oldversionp, newversionp)
   afs_int32               code=0;
   struct ubik_dbase   *dbase;
 
-  if (code = ubik_CheckAuth(rxcall)) {
+  if ((code = ubik_CheckAuth(rxcall))) {
      return(code);
   }
 
index a413ba3e9084f1c3c68f79de503e92525ea44feb..12772caa227326648b61b8e37288625032f0d05c 100644 (file)
@@ -22,6 +22,13 @@ RCSID("$Header$");
 #endif
 #include <time.h>
 #include <lock.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <afs/cellconfig.h>
index 0aad08a85f14c570ea87e7112047f0f61ec50460..8a0c119e414fb92e2a402b06c59a931c843c2784 100644 (file)
@@ -23,6 +23,13 @@ RCSID("$Header$");
 #endif
 #include <time.h>
 #include <lock.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #include <rx/xdr.h>
 #include <rx/rx.h>
 
index 2f9e832f0ee1873499bdd2da16e6216ea174454a..88a40731085d7590ff83b006c0cce27eb544b0d3 100644 (file)
@@ -23,6 +23,13 @@ RCSID("$Header$");
 #endif
 #include <time.h>
 #include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <lock.h>
index 038e027679f8496111bceaa0a0ce87754fc1c0ea..49d05123eafe4b0ea21a074cfddf7bc83b33469f 100644 (file)
@@ -24,6 +24,13 @@ RCSID("$Header$");
 #endif
 #include <time.h>
 #include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <lock.h>
index 28e75e2f1d02a76242d8e0833bbd1ad182cd6356..e850aa8773d9a06bee4bc62b7fc3d0e0bb6fd73a 100644 (file)
@@ -21,6 +21,13 @@ RCSID("$Header$");
 #endif
 #include <afs/afsutil.h>
 #include <lock.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <afs/afsutil.h>