]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
freeswitch: Create struct rlimit rlp where it is needed (move down into block scope).
authorStefan Knoblich <stkn@openisdn.net>
Tue, 10 Jul 2012 22:14:01 +0000 (00:14 +0200)
committerStefan Knoblich <stkn@openisdn.net>
Wed, 11 Jul 2012 09:08:24 +0000 (11:08 +0200)
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
src/switch.c

index 7ef7a157df9c99006b82029fc3efc2ee239c0167..fc076fe709a5c84380d473957ef0f5ab473455e2 100644 (file)
@@ -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);