Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Static analysis fixes backported to the stable-2.0 branch.
  • Loading branch information
icculus committed Feb 7, 2014
1 parent 87f4ed6 commit 1cfce37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions archivers/zip.c
Expand Up @@ -384,8 +384,8 @@ static PHYSFS_sint64 zip_find_end_of_central_dir(void *in, PHYSFS_sint64 *len)
int found = 0;

filelen = __PHYSFS_platformFileLength(in);
BAIL_IF_MACRO(filelen == -1, NULL, 0); /* !!! FIXME: unlocalized string */
BAIL_IF_MACRO(filelen > 0xFFFFFFFF, "ZIP bigger than 2 gigs?!", 0);
BAIL_IF_MACRO(filelen == -1, NULL, -1); /* !!! FIXME: unlocalized string */
BAIL_IF_MACRO(filelen > 0xFFFFFFFF, "ZIP bigger than 2 gigs?!", -1);

/*
* Jump to the end of the file and start reading backwards.
Expand Down
6 changes: 3 additions & 3 deletions platform/macosx.c
Expand Up @@ -29,11 +29,11 @@
/* Wrap PHYSFS_Allocator in a CFAllocator... */
static CFAllocatorRef cfallocator = NULL;

CFStringRef cfallocDesc(const void *info)
CFStringRef cfallocCopyDesc(const void *info)
{
return(CFStringCreateWithCString(cfallocator, "PhysicsFS",
kCFStringEncodingASCII));
} /* cfallocDesc */
} /* cfallocCopyDesc */


static void *cfallocMalloc(CFIndex allocSize, CFOptionFlags hint, void *info)
Expand Down Expand Up @@ -62,7 +62,7 @@ int __PHYSFS_platformInit(void)
/* set up a CFAllocator, so Carbon can use the physfs allocator, too. */
CFAllocatorContext ctx;
memset(&ctx, '\0', sizeof (ctx));
ctx.copyDescription = cfallocDesc;
ctx.copyDescription = cfallocCopyDesc;
ctx.allocate = cfallocMalloc;
ctx.reallocate = cfallocRealloc;
ctx.deallocate = cfallocFree;
Expand Down

0 comments on commit 1cfce37

Please sign in to comment.