Revision: 9759
          http://sourceforge.net/p/skim-app/code/9759
Author:   hofman
Date:     2018-04-12 17:12:32 +0000 (Thu, 12 Apr 2018)
Log Message:
-----------
check errors by negative return value rather than explicit return values

Modified Paths:
--------------
    trunk/SkimNotes/SKNExtendedAttributeManager.m

Modified: trunk/SkimNotes/SKNExtendedAttributeManager.m
===================================================================
--- trunk/SkimNotes/SKNExtendedAttributeManager.m       2018-04-11 14:09:54 UTC 
(rev 9758)
+++ trunk/SkimNotes/SKNExtendedAttributeManager.m       2018-04-12 17:12:32 UTC 
(rev 9759)
@@ -584,7 +584,7 @@
     BOOL hadError = NO;
     do {
         bzret = BZ2_bzCompress(&stream, (stream.avail_in) ? BZ_RUN : 
BZ_FINISH);
-        if (bzret != BZ_RUN_OK && bzret != BZ_FINISH_OK && bzret != 
BZ_STREAM_END) {
+        if (bzret < BZ_OK) {
             hadError = YES;
             compressed = nil;
         } else {        
@@ -619,8 +619,7 @@
     const NSInteger maxHangCount = 100;
     do {
         bzret = BZ2_bzDecompress(&stream);
-        if ((bzret != BZ_OK && bzret != BZ_STREAM_END) ||
-            (BZIP_BUFFER_SIZE == stream.avail_out && ++hangCount > 
maxHangCount)) {
+        if (bzret < BZ_OK || (BZIP_BUFFER_SIZE == stream.avail_out && 
++hangCount > maxHangCount)) {
             hadError = YES;
             decompressed = nil;
         } else {        

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to