summaryrefslogtreecommitdiff
blob: 33ce822f233c5bd58e8e3f3775ada27ff5b48d63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
--- amap-4.8/amap.c	2005-04-10 14:28:06.000000000 -0300
+++ amap-4.8.new/amap.c	2005-04-10 14:23:00.000000000 -0300
@@ -424,7 +424,7 @@
   f = amap_open_file(filename, "trigger", extension, opt->verbose);
   if (opt->verbose > 1)
     printf("\n");
-  if (((amap_struct_triggers*) triggers = (amap_struct_triggers*) trigger = (amap_struct_triggers*) malloc(sizeof(amap_struct_triggers))) == NULL)
+  if ((triggers = trigger = (amap_struct_triggers*) malloc(sizeof(amap_struct_triggers))) == NULL)
     amap_error("malloc failed");
   memset(trigger, 0, sizeof(amap_struct_triggers));
 
@@ -599,7 +599,7 @@
   f = amap_open_file(filename, "response", extension, opt->verbose);
   if (opt->verbose > 1)
     printf("\n");
-  if (((amap_struct_responses*) responses = (amap_struct_responses*) response = (amap_struct_responses*) malloc(sizeof(amap_struct_responses))) == NULL)
+  if ((responses = response = (amap_struct_responses*) malloc(sizeof(amap_struct_responses))) == NULL)
     amap_error("malloc failed");
   memset(response, 0, sizeof(amap_struct_responses));
 
@@ -644,7 +644,7 @@
         for (i = 0; i < strlen(triggerptr); i++)
           if (triggerptr[i] == ',')
             count++;
-        if (((amap_struct_triggerptr*) triggerptr_tmp = response->triggerptr = malloc(sizeof(amap_struct_triggerptr))) == NULL)
+        if ((triggerptr_tmp = response->triggerptr = malloc(sizeof(amap_struct_triggerptr))) == NULL)
           amap_error("malloc failed");
         triggerptr_tmp->next = NULL;
         
@@ -756,7 +756,7 @@
   int count = 0;
 
   f = amap_open_file(filename, "nmap", "", opt->verbose);
-  if (((amap_struct_targets*) targets = (amap_struct_targets*) target = (amap_struct_targets*) malloc(sizeof(amap_struct_targets))) == NULL)
+  if ((targets = target = (amap_struct_targets*) malloc(sizeof(amap_struct_targets))) == NULL)
     amap_error("malloc failed");
   memset(target, 0, sizeof(amap_struct_targets));
   if ((port_tmp = target->ports = (amap_struct_ports *) malloc(sizeof(amap_struct_ports))) == NULL)
@@ -2057,7 +2057,7 @@
       responses_tmp = (amap_struct_responses*) responses_tmp->next;
     }
   } else {
-    if (((amap_struct_triggers*) triggers = (amap_struct_triggers*) malloc(sizeof(amap_struct_triggers))) == NULL)
+    if (( triggers = (amap_struct_triggers*) malloc(sizeof(amap_struct_triggers))) == NULL)
       amap_error("malloc failed");
     triggers->next = NULL;
     triggers->id = strdup("NULL");