From edfbbb127cfc16f32b519a6c9f8233db7f37449e Mon Sep 17 00:00:00 2001 From: Stefan Knoblich <stkn@openisdn.net> Date: Wed, 11 Jul 2012 00:14:01 +0200 Subject: [PATCH] freeswitch: Create struct rlimit rlp where it is needed (move down into block scope). Signed-off-by: Stefan Knoblich <stkn@openisdn.net> --- src/switch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/switch.c b/src/switch.c index 7ef7a157df..fc076fe709 100644 --- a/src/switch.c +++ b/src/switch.c @@ -416,7 +416,6 @@ int main(int argc, char *argv[]) switch_file_t *fd; switch_memory_pool_t *pool = NULL; #ifdef HAVE_SETRLIMIT - struct rlimit rlp; switch_bool_t waste = SWITCH_FALSE; #endif @@ -573,6 +572,7 @@ int main(int argc, char *argv[]) #endif #ifdef HAVE_SETRLIMIT else if (!strcmp(local_argv[x], "-core")) { + struct rlimit rlp; memset(&rlp, 0, sizeof(rlp)); rlp.rlim_cur = RLIM_INFINITY; rlp.rlim_max = RLIM_INFINITY; @@ -789,7 +789,7 @@ int main(int argc, char *argv[]) #if defined(HAVE_SETRLIMIT) && !defined(__sun) if (!waste && !(flags & SCF_VG)) { - //int x; + struct rlimit rlp; memset(&rlp, 0, sizeof(rlp)); getrlimit(RLIMIT_STACK, &rlp);