more-anonymous-pointer-cleanup-20071031
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Wed, 31 Oct 2007 22:31:38 +0000 (22:31 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 31 Oct 2007 22:31:38 +0000 (22:31 +0000)
more char*->void* conversion

src/afs/UKERNEL/afs_usrops.c
src/afsd/afsd.c
src/auth/cellconfig.c
src/auth/cellconfig.p.h
src/auth/test/testcellconf.c

index 74dcbca..e56ccc8 100644 (file)
@@ -1389,8 +1389,8 @@ SweepAFSCache(int *vFilesFound)
     return (0);
 }
 
-static
-ConfigCell(register struct afsconf_cell *aci, char *arock,
+static int
+ConfigCell(register struct afsconf_cell *aci, void *arock,
           struct afsconf_dir *adir)
 {
     register int isHomeCell;
@@ -1420,10 +1420,7 @@ ConfigCell(register struct afsconf_cell *aci, char *arock,
 }
 
 static int
-ConfigCellAlias(aca, arock, adir)
-       struct afsconf_cellalias *aca;
-       char *arock;
-       struct afsconf_dir *adir;
+ConfigCellAlias(struct afsconf_cellalias *aca, void *arock, struct afsconf_dir *adir)
 {
        call_syscall(AFSOP_ADDCELLALIAS, (long)aca->aliasName, 
                     (long)aca->realName, 0, 0, 0);
index 7a7699a..0b08fdc 100644 (file)
@@ -1391,8 +1391,8 @@ SweepAFSCache(vFilesFound)
     return doSweepAFSCache(vFilesFound, cacheBaseDir, -2, maxDir);
 }
 
-static
-ConfigCell(struct afsconf_cell *aci, char *arock, struct afsconf_dir *adir)
+static int
+ConfigCell(struct afsconf_cell *aci, void *arock, struct afsconf_dir *adir)
 {
     int isHomeCell;
     int i, code;
@@ -1424,7 +1424,7 @@ ConfigCell(struct afsconf_cell *aci, char *arock, struct afsconf_dir *adir)
 
 static
 ConfigCellAlias(struct afsconf_cellalias *aca,
-               char *arock, struct afsconf_dir *adir)
+               void *arock, struct afsconf_dir *adir)
 {
     /* push the alias into the kernel */
     call_syscall(AFSOP_ADDCELLALIAS, aca->aliasName, aca->realName);
index 761132a..bfef672 100644 (file)
@@ -770,8 +770,8 @@ ParseCellLine(register char *aline, register char *aname,
 /* call aproc(entry, arock, adir) for all cells.  Proc must return 0, or we'll stop early and return the code it returns */
 int
 afsconf_CellApply(struct afsconf_dir *adir,
-                 int (*aproc) (struct afsconf_cell * cell, char *arock,
-                               struct afsconf_dir * dir), char *arock)
+                 int (*aproc) (struct afsconf_cell * cell, void *arock,
+                               struct afsconf_dir * dir), void *arock)
 {
     register struct afsconf_entry *tde;
     register afs_int32 code;
@@ -793,8 +793,8 @@ afsconf_CellApply(struct afsconf_dir *adir,
 int
 afsconf_CellAliasApply(struct afsconf_dir *adir,
                       int (*aproc) (struct afsconf_cellalias * alias,
-                                    char *arock, struct afsconf_dir * dir),
-                      char *arock)
+                                    void *arock, struct afsconf_dir * dir),
+                      void *arock)
 {
     register struct afsconf_aliasentry *tde;
     register afs_int32 code;
index e2ae6ed..4a1bf0d 100644 (file)
@@ -101,14 +101,14 @@ struct afsconf_servPair {
 extern struct afsconf_dir *afsconf_Open(register const char *adir);
 extern int afsconf_CellApply(struct afsconf_dir *adir,
                             int (*aproc) (struct afsconf_cell * cell,
-                                          char *arock,
+                                          void *arock,
                                           struct afsconf_dir * dir),
-                            char *arock);
+                            void *arock);
 extern int afsconf_CellAliasApply(struct afsconf_dir *adir,
                                  int (*aproc) (struct afsconf_cellalias *
-                                               alias, char *arock,
+                                               alias, void *arock,
                                                struct afsconf_dir * dir),
-                                 char *arock);
+                                 void *arock);
 extern int afsconf_GetExtendedCellInfo(struct afsconf_dir *adir,
                                       char *acellName, char *aservice,
                                       struct afsconf_cell *acellInfo,
index 4f80026..1bc9cae 100644 (file)
@@ -40,10 +40,8 @@ RCSID
 #endif
 #include <afs/cellconfig.h>
 
-PrintOneCell(ainfo, arock, adir)
-     struct afsconf_cell *ainfo;
-     char *arock;
-     struct afsconf_dir *adir;
+int 
+PrintOneCell(struct afsconf_cell *ainfo, void *arock, struct afsconf_dir *adir)
 {
     register int i;
     long temp;
@@ -101,7 +99,7 @@ main(argc, argv)
            printf("failed to find afsprot service (%d)\n", code);
        else {
            printf("AFSPROT service:\n");
-           PrintOneCell(&theCell, (char *)NULL, theDir);
+           PrintOneCell(&theCell, NULL, theDir);
        }
        code = afsconf_GetCellInfo(theDir, 0, "bozotheclown", &theCell);
        if (code == 0)