From: cristy <urban-warrior@git.imagemagick.org>
Date: Thu, 18 Apr 2013 12:55:47 +0000 (+0000)
Subject: (no commit message)
X-Git-Tag: 7.0.1-0~3859
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c91e2db88187a992c9770fd4e5b4d64555fc457;p=imagemagick

---

diff --git a/MagickCore/utility.c b/MagickCore/utility.c
index 6dedc6013..18fca20c9 100644
--- a/MagickCore/utility.c
+++ b/MagickCore/utility.c
@@ -1765,8 +1765,8 @@ MagickExport size_t MultilineCensus(const char *label)
 %
 %  ShredFile() overwrites the specified file with zeros or random data and then
 %  removes it.  The overwrite is optional and is only required to help keep
-%  the contents of the file private.  The first, the file is zeroed.  For
-%  other passes, random data is written.
+%  the contents of the file private.  On the first pass, the file is zeroed.
+%  For subsequent passes, random data is written.
 %
 %  The format of the ShredFile method is:
 %
@@ -1780,7 +1780,7 @@ MagickExport size_t MultilineCensus(const char *label)
 MagickPrivate MagickBooleanType ShredFile(const char *path)
 {
   char
-    *iterations;
+    *passes;
 
   ExceptionInfo
     *exception;
@@ -1804,12 +1804,12 @@ MagickPrivate MagickBooleanType ShredFile(const char *path)
   if ((path == (const char *) NULL) || (*path == '\0'))
     return(MagickFalse);
   exception=AcquireExceptionInfo();
-  iterations=(char *) GetImageRegistry(StringRegistryType,"temporary-path",
+  passes=(char *) GetImageRegistry(StringRegistryType,"shred-passes",
     exception);
   exception=DestroyExceptionInfo(exception);
-  if (iterations == (char *) NULL)
-    iterations=GetEnvironmentValue("MAGICK_SHRED_FILE");
-  if (iterations == (char *) NULL)
+  if (passes == (char *) NULL)
+    passes=GetEnvironmentValue("MAGICK_SHRED_PASSES");
+  if (passes == (char *) NULL)
     {
       /*
         Don't shred the file, just remove it.
@@ -1830,7 +1830,7 @@ MagickPrivate MagickBooleanType ShredFile(const char *path)
     quantum=(size_t) MagickMin((MagickSizeType) file_stats.st_size,
       MagickMaxBufferExtent);
   length=(MagickSizeType) file_stats.st_size;
-  for (i=0; i < StringToInteger(iterations); i++)
+  for (i=0; i < StringToInteger(passes); i++)
   {
     RandomInfo
       *random_info;
@@ -1870,7 +1870,7 @@ MagickPrivate MagickBooleanType ShredFile(const char *path)
   status=remove_utf8(path);
   if (status == -1)
     return(MagickFalse);
-  return(i < StringToInteger(iterations) ? MagickFalse : MagickTrue);
+  return(i < StringToInteger(passes) ? MagickFalse : MagickTrue);
 }
 
 /*