]> Dogcows Code - chaz/tar/blobdiff - src/diffarch.c
Fix Solaris bug where chmod fails if we don't have PRIV_SYS_LINKDIR
[chaz/tar] / src / diffarch.c
index 8038e794f4a20159661c1583a0db790e215fc829..ce47d9d6cab5b152d79123049dca6b198c93e018 100644 (file)
@@ -1,5 +1,5 @@
 /* Diff files from a tar archive.
-   Copyright (C) 1988, 1992 Free Software Foundation
+   Copyright (C) 1988, 1992, 1993 Free Software Foundation
 
 This file is part of GNU Tar.
 
@@ -586,7 +586,7 @@ diff_sparse_files (filesize)
   /*   int             amt_read = 0;*/
   int size = filesize;
 
-  buf = (char *) malloc (buf_size * sizeof (char));
+  buf = (char *) ck_malloc (buf_size * sizeof (char));
 
   fill_in_sparse_array ();
 
@@ -609,7 +609,7 @@ diff_sparse_files (filesize)
                 */
       while (buf_size < numbytes)
        {
-         buf = (char *) realloc (buf, buf_size * 2 * sizeof (char));
+         buf = (char *) ck_realloc (buf, buf_size * 2 * sizeof (char));
          buf_size *= 2;
        }
       while (numbytes > RECORDSIZE)
@@ -620,7 +620,7 @@ diff_sparse_files (filesize)
                msg_perror ("can't read %s", current_file_name);
              else
                fprintf (msg_file, "%s: could only read %d of %d bytes\n",
-                        err, numbytes);
+                        current_file_name, err, numbytes);
              break;
            }
          if (bcmp (buf, datarec->charptr, RECORDSIZE))
@@ -639,7 +639,7 @@ diff_sparse_files (filesize)
            msg_perror ("can't read %s", current_file_name);
          else
            fprintf (msg_file, "%s: could only read %d of %d bytes\n",
-                    err, numbytes);
+                    current_file_name, err, numbytes);
          break;
        }
 
@@ -692,7 +692,7 @@ fill_in_sparse_array ()
         * necessary
         */
   sp_array_size = 10;
-  sparsearray = (struct sp_array *) malloc (sp_array_size * sizeof (struct sp_array));
+  sparsearray = (struct sp_array *) ck_malloc (sp_array_size * sizeof (struct sp_array));
 
   /*
         * there are at most five of these structures in the header
@@ -729,7 +729,7 @@ fill_in_sparse_array ()
                                 *  scratch area - realloc it
                                 */
                  sparsearray = (struct sp_array *)
-                   realloc (sparsearray,
+                   ck_realloc (sparsearray,
                             sp_array_size * 2 * sizeof (struct sp_array));
                  sp_array_size *= 2;
                }
This page took 0.027353 seconds and 4 git commands to generate.