/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
-
#include <afsconfig.h>
#include <afs/param.h>
+#include <afs/stds.h>
+#include <roken.h>
/*
* (3) Define a structure, idused, instead of an
* conditions.
*/
-#include <afs/stds.h>
-#include <sys/types.h>
+
#ifdef AFS_NT40_ENV
-#include <winsock2.h>
#include <WINNT/afsevent.h>
-#include <io.h>
#else
-#include <netdb.h>
-#include <netinet/in.h>
#include <sys/file.h>
#endif
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <fcntl.h>
+
#include <afs/cellconfig.h>
#include <afs/afsutil.h>
#include <ubik.h>
}
uheader.magic = ntohl(uheader.magic);
- uheader.size = ntohl(uheader.size);
+ uheader.size = ntohs(uheader.size);
uheader.version.epoch = ntohl(uheader.version.epoch);
uheader.version.counter = ntohl(uheader.version.counter);
id = ntohl(e.id);
#if defined(SUPERGROUPS)
if ((id != ANONYMOUSID)
- && ((refCount = idcount(&misc->idmap, id)) != ntohl(e.count)))
+ && ((refCount = idcount(&misc->idmap, id)) != ntohl(e.count)))
#else
if ((id >= misc->minId) && (id <= misc->maxId)
&& (id != ANONYMOUSID)
&& ((refCount = misc->idmap[id - misc->minId]) !=
- ntohl(e.count)))
+ ntohl(e.count)))
#endif /* SUPERGROUPS */
{
afs_int32 na;
{
char *qs;
if (strpbrk(s, " \t")) {
- qs = (char *)malloc(strlen(s) + 3);
- strcpy(qs, "\"");
- strcat(qs, s);
- strcat(qs, "\"");
+ asprintf(&qs, "\"%s\"", s);
} else
qs = s;
return qs;
/* check for duplicate id. This may still lead to duplicate
* names. */
#if defined(SUPERGROUPS)
- if (idcount(&idmap, id))
+ if (idcount(&idmap, id))
#else
- if (idmap[id - misc->minId])
+ if (idmap[id - misc->minId])
#endif
{
fprintf(stderr, "Skipping entry with duplicate id %di\n",
owner = ntohl(e.owner);
#if defined(SUPERGROUPS)
- if (!idcount(&idmap, owner))
+ if (!idcount(&idmap, owner))
#else
- if (idmap[owner - misc->minId] == 0)
+ if (idmap[owner - misc->minId] == 0)
#endif
{
fprintf(stderr,
free(map);
return code;
}
-
+
#include "AFS_component_version_number.c"
int