X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=zone.c;h=585c10396d03db32e726ccaef168d1eb32b52043;hb=7b93eeb43719a7cf4c2cce06a4d99178fdc70e93;hp=43774da6468fbaaeeec60ec8993944a245772ed7;hpb=af82f89b95001b7ada54c8a62465d0a6aca0d2bf;p=xonotic%2Fdarkplaces.git diff --git a/zone.c b/zone.c index 43774da6..585c1039 100644 --- a/zone.c +++ b/zone.c @@ -844,8 +844,10 @@ void MemStats_f(void) char* Mem_strdup (mempool_t *pool, const char* s) { char* p; - size_t sz = strlen (s) + 1; - if (s == NULL) return NULL; + size_t sz; + if (s == NULL) + return NULL; + sz = strlen (s) + 1; p = (char*)Mem_Alloc (pool, sz); strlcpy (p, s, sz); return p; @@ -860,7 +862,7 @@ void Memory_Init (void) { static union {unsigned short s;unsigned char b[2];} u; u.s = 0x100; - mem_bigendian = u.b[0]; + mem_bigendian = u.b[0] != 0; sentinel_seed = rand(); poolchain = NULL;