pull-prototypes-to-head-20020821
[openafs.git] / src / xstat / xstat_cm.c
index b139f4b..25cfca4 100644 (file)
@@ -22,6 +22,14 @@ RCSID("$Header$");
 #include "xstat_cm.h"                  /*Interface for this module*/
 #include <lwp.h>                       /*Lightweight process package*/
 
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+
 #define LWP_STACK_SIZE (16 * 1024)
 
 /*
@@ -455,7 +463,7 @@ int xstat_cm_Init(a_numServers, a_socketArray, a_ProbeFreqInSecs,
                rn, a_numServers);
        arg_errfound = 1;
     }
-    if (a_collIDP == (afs_int32 *)0) {
+    if (a_collIDP == NULL) {
        fprintf(stderr, "[%s] Null collection ID array argument\n", rn);
        arg_errfound = 1;
     }
@@ -523,7 +531,7 @@ int xstat_cm_Init(a_numServers, a_socketArray, a_ProbeFreqInSecs,
      * Create a null Rx client security object, to be used by the
      * probe LWP.
      */
-    secobj = (struct rx_securityClass *) rxnull_NewClientSecurityObject();
+    secobj = rxnull_NewClientSecurityObject();
     if (secobj == (struct rx_securityClass *)0) {
        fprintf(stderr,
                "[%s] Can't create probe LWP client security object.\n",
@@ -553,7 +561,7 @@ int xstat_cm_Init(a_numServers, a_socketArray, a_ProbeFreqInSecs,
        
        hostNameFound =
            hostutil_GetNameByINet(curr_conn->skt.sin_addr.s_addr);
-       if (hostNameFound == (char *)0) {
+       if (hostNameFound == NULL) {
            fprintf(stderr,
                    "[%s] Can't map Internet address %lu to a string name\n",
                    rn, curr_conn->skt.sin_addr.s_addr);