]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - zone.c
instead, define the FILE_OFFSET_BITS part in the build environment, and remove it...
[xonotic/darkplaces.git] / zone.c
diff --git a/zone.c b/zone.c
index fb314e4b535375280c024f7c41f7b7b940b60af3..585c10396d03db32e726ccaef168d1eb32b52043 100644 (file)
--- 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;
@@ -891,7 +893,7 @@ void Memory_Init_Commands (void)
                Cvar_SetValueQuick(&sys_memsize_virtual, 8388608);
                // then improve
                status.dwLength = sizeof(status);
-               if(!GlobalMemoryStatusEx(&status))
+               if(GlobalMemoryStatusEx(&status))
                {
                        Cvar_SetValueQuick(&sys_memsize_physical, status.ullTotalPhys / 1048576.0);
                        Cvar_SetValueQuick(&sys_memsize_virtual, min(sys_memsize_virtual.value, status.ullTotalVirtual / 1048576.0));