#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] = "";
#include <winsock2.h>
#else
#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 <ubik.h>
#include <rx/xdr.h>
if (ntohl(tentry.flags) & PRGRP) {
if ((tentry.count == 0) && !admin) return PRGROUPEMPTY;
/* terminate prefix at colon if there is one */
- if (prefix = strchr(tentry.name, ':')) *prefix = 0;
+ if ((prefix = strchr(tentry.name, ':'))) *prefix = 0;
}
prefix = tentry.name;
}
}
done:
/* check for legal name with either group rules or user rules */
- if (suffix = strchr(cname, ':')) {
+ if ((suffix = strchr(cname, ':'))) {
/* check for confusing characters */
if (strchr(cname, '\n') || /* restrict so recreate can work */
strchr(suffix+1, ':')) /* avoid multiple colons */
} else {
flags = oid = aid = 0;
}
- if (!(flags & PRACCESS)) /* provide default access */
+ if (!(flags & PRACCESS)) { /* provide default access */
if (flags & PRGRP)
flags |= PRP_GROUP_DEFAULT;
else
flags |= PRP_USER_DEFAULT;
+ }
if (flags & any) return 1;
if (oid) {
afs_int32 nptr;
afs_int32 last; /* addr of last cont. block */
afs_int32 first = 0;
- afs_int32 cloc;
+ afs_int32 cloc = 0;
afs_int32 slot = -1;
if (entry->id == aid) return PRINCONSISTENT;
prlist *alist;
afs_int32 add;
{
- afs_int32 code;
+ afs_int32 code = 0;
afs_int32 i;
struct contentry centry;
afs_int32 nptr;