ubik-warning-cleanup-20011005
[openafs.git] / src / ubik / remote.c
index 33b7af5..bb5354a 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>
@@ -28,6 +35,7 @@ RCSID("$Header$");
 #include "ubik_int.h"
 int (*ubik_CheckRXSecurityProc)();
 char *ubik_CheckRXSecurityRock;
+void printServerInfo();
 
 /* routines for handling requests remotely-submitted by the sync site.  These are
     only write transactions (we don't propagate read trans), and there is at most one
@@ -57,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);
@@ -86,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;
     }
 
@@ -124,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;
     }
 
@@ -160,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;
     }
 
@@ -199,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) {
@@ -248,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) {
@@ -295,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) {
@@ -327,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) { 
@@ -356,7 +364,7 @@ SDISK_GetVersion(rxcall, aversion)
 {
     register afs_int32 code;
 
-    if (code = ubik_CheckAuth(rxcall)) {
+    if ((code = ubik_CheckAuth(rxcall))) {
       return code;
     }
 
@@ -400,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
@@ -453,7 +461,7 @@ SDISK_SendFile(rxcall, file, length, avers)
     register afs_int32 code;
     register struct ubik_dbase *dbase;
     char tbuffer[256];
-    afs_int32 offset, t;
+    afs_int32 offset;
     struct ubik_version tversion;
     register int tlen;
     struct rx_peer *tpeer;
@@ -462,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;
     }
 
@@ -522,7 +530,7 @@ SDISK_SendFile(rxcall, file, length, avers)
        This way, good label is only on good database. */
     (*ubik_dbase->sync)(dbase, file);
     code = (*ubik_dbase->setlabel)(dbase, file, avers);
-    bcopy(avers, &ubik_dbase->version, sizeof(struct ubik_version));
+    memcpy(&ubik_dbase->version, avers, sizeof(struct ubik_version));
     udisk_Invalidate(dbase, file); /* new dbase, flush disk buffers */
     LWP_NoYieldSignal(&dbase->version);
     DBRELE(dbase);
@@ -614,6 +622,7 @@ UbikInterfaceAddr   *inAddr, *outAddr;
     return 0;
 }
 
+void
 printServerInfo()
 {
     struct ubik_server *ts;
@@ -638,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);
   }