]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 21 Oct 2012 00:55:09 +0000 (00:55 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 21 Oct 2012 00:55:09 +0000 (00:55 +0000)
MagickCore/cache.c

index d45c1a390ebde792d33866657f95cff320e5b684..92ec430af81c66838ad1a5ab564b6704da8af442 100644 (file)
@@ -551,13 +551,11 @@ static inline MagickOffsetType ReadPixelCacheRegion(
     count=pread(cache_info->file,buffer+i,(size_t) MagickMin(length-i,
       (MagickSizeType) SSIZE_MAX),(off_t) (offset+i));
 #endif
-    if (count > 0)
-      continue;
-    count=0;
-    if (errno != EINTR)
+    if (count <= 0)
       {
-        i=(-1);
-        break;
+        count=0;
+        if (errno != EINTR)
+          break;
       }
   }
 #if !defined(MAGICKCORE_HAVE_PREAD)
@@ -594,13 +592,11 @@ static inline MagickOffsetType WritePixelCacheRegion(
     count=pwrite(cache_info->file,buffer+i,(size_t) MagickMin(length-i,
       (MagickSizeType) SSIZE_MAX),(off_t) (offset+i));
 #endif
-    if (count > 0)
-      continue;
-    count=0;
-    if (errno != EINTR)
+    if (count <= 0)
       {
-        i=(-1);
-        break;
+        count=0;
+        if (errno != EINTR)
+          break;
       }
   }
 #if !defined(MAGICKCORE_HAVE_PWRITE)