Don't cast returns from malloc()
[openafs.git] / src / platform / SOLARIS / fs_conv_sol26.c
index 014783b..b23acfe 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
-RCSID
-    ("$Header$");
 
 #include <stdio.h>
 
-#if defined(AFS_SUN54_ENV)
 #define OSVERS "SunOS 5.6"
 #include <sys/types.h>
 #include <rx/xdr.h>
@@ -43,8 +40,9 @@ RCSID
 #include <afs/osi_inode.h>
 #include <errno.h>
 
-#include <nfs.h>
-#include <partition.h>
+#include <afs/nfs.h>
+#include <afs/ihandle.h>
+#include <afs/partition.h>
 #include <afs/cmd.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -72,7 +70,7 @@ UnConvCmd(struct cmd_syndesc *as, void *arock)
 static int
 handleit(struct cmd_syndesc *as)
 {
-    register struct cmd_item *ti;
+    struct cmd_item *ti;
     char *dname;
     afs_int32 haspart = 0, hasDevice = 0;
     struct vfstab mnt;
@@ -187,7 +185,7 @@ handleit(struct cmd_syndesc *as)
 main(argc, argv)
      char **argv;
 {
-    register struct cmd_syndesc *ts;
+    struct cmd_syndesc *ts;
     afs_int32 code;
 
     if (geteuid() != 0) {
@@ -290,7 +288,7 @@ ProcessAfsInodes(devname, partition)
        goto out;
     }
     bufsize = super.fs.fs_ipg * sizeof(struct dinode);
-    if (!(inodes = (struct dinode *)malloc(bufsize))) {
+    if (!(inodes = malloc(bufsize))) {
        printf("Unable to allocate enough memory to scan inodes; help!\n");
        goto out;
     }
@@ -333,11 +331,7 @@ ProcessAfsInodes(devname, partition)
                int p5;
                quad *q;
 
-#if    defined(AFS_SUN56_ENV)
                q = (quad *) & (p->di_ic.ic_lsize);
-#else
-               q = &(p->di_ic.ic_size);
-#endif
 
                p1 = p->di_gen;
                p2 = p->di_ic.ic_flags;
@@ -707,17 +701,3 @@ CheckMountedDevice(devName)
        return 1;
     return 0;
 }
-
-#else /* !AFS_SUN54_ENV */
-
-#include "AFS_component_version_number.c"
-
-main(argc, argv)
-     int argc;
-     char *argv[];
-{
-    printf
-       ("%s: **ONLY** supported for Solaris 2.4 and later ...\n",
-        argv[0]);
-}
-#endif /* !AFS_SUN5_ENV */