#ifdef AFS_NT40_ENV
#include <winsock2.h>
#else
-#include <strings.h>
#include <netinet/in.h>
#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
#include "ptserver.h"
#include "pterror.h"
#include "afs/audit.h"
goto done; /* no longer supported */
}
else if (code == 2) { /* kad class */
- if (code = rxkad_GetServerInfo
+ if ((code = rxkad_GetServerInfo
(acall->conn, (afs_int32 *) 0, 0/*was &exp*/,
- name, inst, tcell, (afs_int32 *) 0))
+ name, inst, tcell, (afs_int32 *) 0)))
goto done;
#if 0
/* This test is unnecessary, since rxkad_GetServerInfo already check.
ABORT_WITH(tt,PRPERM);
aentry->flags = tentry.flags >> PRIVATE_SHIFT;
- if (aentry->flags == 0)
+ if (aentry->flags == 0) {
if (tentry.flags & PRGRP)
aentry->flags = PRP_GROUP_DEFAULT >> PRIVATE_SHIFT;
else aentry->flags = PRP_USER_DEFAULT >> PRIVATE_SHIFT;
+ }
aentry->owner = tentry.owner;
aentry->id = tentry.id;
strncpy(aentry->name,tentry.name,PR_MAXNAMELEN);
register char *s;
{
register int tc;
- while (tc = *s) {
+ while ((tc = *s)) {
if (isupper(tc)) *s = tolower(tc);
s++;
}
int size = 0, i, code;
int added = 0;
- while (host = (host & wild)) {
+ while ((host = (host & wild))) {
wild = htonl ( ntohl(wild) << 8) ;
iaddr.s_addr = host;
code = NameToID(tt, inet_ntoa(iaddr),&hostid);
added += wlist.prlist_len;
for (i=0; i< wlist.prlist_len; i++) {
if (!inCPS(*alist,wlist.prlist_val[i]))
- if (code = AddToPRList (alist, &size, wlist.prlist_val[i] )) {
+ if ((code = AddToPRList (alist, &size, wlist.prlist_val[i] ))) {
free(wlist.prlist_val);
return(code);
}
int clen;
extern char *pr_realmName;
- if (code = rxkad_GetServerInfo
+ if ((code = rxkad_GetServerInfo
(acall->conn, (afs_int32 *) 0, 0/*was &exp*/,
- name, inst, tcell, (afs_int32 *) 0))
+ name, inst, tcell, (afs_int32 *) 0)))
goto done;
strncpy (vname, name, sizeof(vname));
- if (ilen = strlen (inst)) {
+ if ((ilen = strlen(inst))) {
if (strlen(vname) + 1 + ilen >= sizeof(vname)) goto done;
strcat (vname, ".");
strcat (vname, inst);
}
- if (clen = strlen (tcell)){
+ if ( (clen = strlen(tcell))) {
#if defined(AFS_ATHENA_STDENV) || defined(AFS_KERBREALM_ENV)
static char local_realm[AFS_REALM_SZ] = "";