Declaring variable outside the for loop

This commit is contained in:
Manish Malik
2016-05-05 10:03:41 -07:00
committed by Felipe Zimmerle
parent c85529158e
commit 5728110272

View File

@@ -85,6 +85,7 @@ int main (int argc, char **argv)
int i = 0; int i = 0;
pid_t pid; pid_t pid;
int shmid; int shmid;
int h;
modsec = msc_init(); modsec = msc_init();
@@ -110,7 +111,7 @@ int main (int argc, char **argv)
msc_rules_dump(rules); msc_rules_dump(rules);
for (int h = 0; h < FORKS; h++) { for (h = 0; h < FORKS; h++) {
pid = fork(); pid = fork();
if (pid == 0) { if (pid == 0) {
pthread_create (&thread[h*TRHREADS], NULL, (void *) &process_request, (void *) NULL); pthread_create (&thread[h*TRHREADS], NULL, (void *) &process_request, (void *) NULL);