[svn:parrot] r38738 - trunk/src

petdance at svn.parrot.org petdance at svn.parrot.org
Wed May 13 04:47:09 UTC 2009


Author: petdance
Date: Wed May 13 04:47:08 2009
New Revision: 38738
URL: https://trac.parrot.org/parrot/changeset/38738

Log:
return NULL not 0 for pointers. Cast ->wordsize to int for %d

Modified:
   trunk/src/packfile.c

Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c	Wed May 13 04:29:58 2009	(r38737)
+++ trunk/src/packfile.c	Wed May 13 04:47:08 2009	(r38738)
@@ -2065,8 +2065,8 @@
 #endif
             else {
                 fprintf(stderr, "directory_unpack failed: invalid wordsize %d\n",
-                        pf->header->wordsize);
-                return 0;
+                        (int)pf->header->wordsize);
+                return NULL;
             }
             TRACE_PRINTF_VAL(("Segment offset: new pos 0x%x "
                               "(src=0x%x cursor=0x%x).\n",
@@ -2122,7 +2122,7 @@
         if (!pos) {
             fprintf(stderr, "PackFile_unpack segment '%s' failed\n",
                     dir->segments[i]->name);
-            return 0;
+            return NULL;
         }
         else {
             TRACE_PRINTF_VAL(("PackFile_Segment_unpack ok. pos=0x%x\n", pos));


More information about the parrot-commits mailing list