diff options
Diffstat (limited to 'src/debug.c')
-rw-r--r-- | src/debug.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/debug.c b/src/debug.c index 83f37cd3d..b2c3de69a 100644 --- a/src/debug.c +++ b/src/debug.c @@ -329,7 +329,8 @@ void mallctl_int(client *c, robj **argv, int argc) { } size_t sz = sizeof(old); while (sz > 0) { - if ((ret=je_mallctl(argv[0]->ptr, &old, &sz, argc > 1? &val: NULL, argc > 1?sz: 0))) { + size_t zz = sz; + if ((ret=je_mallctl(argv[0]->ptr, &old, &zz, argc > 1? &val: NULL, argc > 1?sz: 0))) { if (ret == EPERM && argc > 1) { /* if this option is write only, try just writing to it. */ if (!(ret=je_mallctl(argv[0]->ptr, NULL, 0, &val, sz))) { @@ -520,7 +521,7 @@ NULL restartServer(flags,delay); addReplyError(c,"failed to restart the server. Check server logs."); } else if (!strcasecmp(c->argv[1]->ptr,"oom")) { - void *ptr = zmalloc(ULONG_MAX); /* Should trigger an out of memory. */ + void *ptr = zmalloc(SIZE_MAX/2); /* Should trigger an out of memory. */ zfree(ptr); addReply(c,shared.ok); } else if (!strcasecmp(c->argv[1]->ptr,"assert")) { @@ -2056,9 +2057,9 @@ void dumpCodeAroundEIP(void *eip) { } } -void invalidFunctionWasCalled() {} +void invalidFunctionWasCalled(void) {} -typedef void (*invalidFunctionWasCalledType)(); +typedef void (*invalidFunctionWasCalledType)(void); void sigsegvHandler(int sig, siginfo_t *info, void *secret) { UNUSED(secret); @@ -2227,7 +2228,7 @@ void watchdogScheduleSignal(int period) { it.it_interval.tv_usec = 0; setitimer(ITIMER_REAL, &it, NULL); } -void applyWatchdogPeriod() { +void applyWatchdogPeriod(void) { struct sigaction act; /* Disable watchdog when period is 0 */ |