maint: remove useless casts to avoid "make syntax-check" failures
authorJim Meyering <meyering@redhat.com>
Sat, 26 Sep 2009 17:40:54 +0000 (19:40 +0200)
committerJim Meyering <meyering@redhat.com>
Sat, 26 Sep 2009 17:43:37 +0000 (19:43 +0200)
* gzip.c (do_exit): Remove anachronistic cast.
* inflate.c (huft_free): Likewise.
* util.c (add_envopt): Likewise.
* vms/vms.c (vms_expand_args): Likewise.

gzip.c
inflate.c
util.c
vms/vms.c

diff --git a/gzip.c b/gzip.c
index 71e0674dee6c9f3ab9536484bbecad3f2237b89f..6f437e02fc3378f26c1163e067afc9b63ce120fb 100644 (file)
--- a/gzip.c
+++ b/gzip.c
@@ -1830,7 +1830,7 @@ local void do_exit(exitcode)
     if (in_exit) exit(exitcode);
     in_exit = 1;
     if (env != NULL)  free(env),  env  = NULL;
-    if (args != NULL) free((char*)args), args = NULL;
+    if (args != NULL) free(args), args = NULL;
     FREE(inbuf);
     FREE(outbuf);
     FREE(d_buf);
index 71ce8efdbcd764c4e752c9c9589f0be78ccb45a4..928326dbba8d4c2b9186b5eb0f7edffbafe968ec 100644 (file)
--- a/inflate.c
+++ b/inflate.c
@@ -512,7 +512,7 @@ struct huft *t;         /* table to free */
   while (p != (struct huft *)NULL)
   {
     q = (--p)->v.t;
-    free((char*)p);
+    free(p);
     p = q;
   }
   return 0;
diff --git a/util.c b/util.c
index f375bf8c49270201c0f3c1cc84e9566b50976705..1272f56ee9c4ef1a012d7f47e6e7ef7f9e7852ca 100644 (file)
--- a/util.c
+++ b/util.c
@@ -392,7 +392,7 @@ char *add_envopt(argcp, argvp, env)
     /* Allocate the new argv array, with an extra element just in case
      * the original arg list did not end with a NULL.
      */
-    nargv = (char **) xcalloc (*argcp + 1, sizeof (char *));
+    nargv = xcalloc (*argcp + 1, sizeof (char *));
     oargv  = *argvp;
     *argvp = nargv;
 
index 51b891a22fbc17c5a42ab09e2d12d0e21871d101..c9276ed4b750ae78ff5fb8b753d0fe8abb28b86d 100644 (file)
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -26,7 +26,7 @@ vms_expand_args(old_argc, argv)
     int            context, status;
     char    buf[255], *p;
     
-    vms_argv = (char**)xmalloc((max_files+1)*sizeof(char*));
+    vms_argv = xmalloc((max_files+1)*sizeof(char*));
 
     vms_argv[new_argc++] = **argv;
 
@@ -46,14 +46,14 @@ vms_expand_args(old_argc, argv)
                    vms_argv[new_argc++] = argv[0][i];
                }
            } else {
-               p = (char*)xmalloc(strlen(buf)+1);
+               p = xmalloc(strlen(buf)+1);
                strcpy(p, buf);
                if (new_argc < max_files) {
                    vms_argv[new_argc++] = p;
                }
                while (find_file_c(argv[0][i], buf, 
                       sizeof(buf), &context) & 1 == 1) {
-                   p = (char*)xmalloc(strlen(buf)+1);
+                   p = xmalloc(strlen(buf)+1);
                    strcpy(p, buf);
                    if (new_argc < max_files) {
                        vms_argv[new_argc++] = p;