venus: Remove dedebug
[openafs.git] / src / log / unlog.c
index 764fe44..bc4428e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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 <roken.h>
+#include <afs/opr.h>
 
-#include <stdio.h>
-#include <potpourri.h>
-#ifdef AFS_AIX32_ENV
-#include <signal.h>
-#endif
-
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <sys/ioctl.h>
 #include <afs/vice.h>
-#include <sys/file.h>
 
 #include <afs/auth.h>
 #include <afs/cellconfig.h>
@@ -75,7 +65,7 @@ CommandProc(struct cmd_syndesc *as, void *arock)
 
     if (as->parms[0].items) {  /* A cell is provided */
        for (itp = as->parms[0].items; itp; itp = itp->next) {
-           if (i > MAXCELLS) {
+           if (i >= MAXCELLS) {
                printf
                    ("The maximum number of cells (%d) is exceeded; the rest are ignored\n",
                     MAXCELLS);
@@ -104,8 +94,8 @@ main(int argc, char *argv[])
 
 #ifdef AFS_AIX32_ENV
     /*
-     * The following signal action for AIX is necessary so that in case of a 
-     * crash (i.e. core is generated) we can include the user's data section 
+     * The following signal action for AIX is necessary so that in case of a
+     * crash (i.e. core is generated) we can include the user's data section
      * in the core dump. Unfortunately, by default, only a partial core is
      * generated which, in many cases, isn't too useful.
      */
@@ -117,7 +107,7 @@ main(int argc, char *argv[])
     sigaction(SIGSEGV, &nsa, NULL);
 #endif
 
-    ts = cmd_CreateSyntax(NULL, CommandProc, NULL,
+    ts = cmd_CreateSyntax(NULL, CommandProc, NULL, 0,
                          "Release Kerberos authentication");
     cmd_AddParm(ts, "-cell", CMD_LIST, CMD_OPTIONAL, "cell name");
 
@@ -153,8 +143,7 @@ unlog_ForgetCertainTokens(char **list, int listSize)
        code = ktc_ListTokens(count, &count, &serviceName);
     } while (!code);
 
-    tokenInfoP =
-       (struct tokenInfo *)malloc((sizeof(struct tokenInfo) * count));
+    tokenInfoP = malloc((sizeof(struct tokenInfo) * count));
     if (!tokenInfoP) {
        perror("unlog_ForgetCertainTokens -- osi_Alloc failed");
        exit(1);