Added
Link Here
|
1 |
--- ifdepd.c.orig 2011-04-12 13:24:48 UTC |
2 |
+++ ifdepd.c |
3 |
@@ -188,7 +188,7 @@ void int_down(int_name if_name) { |
4 |
} |
5 |
} |
6 |
|
7 |
-inline void cleanup() { |
8 |
+static inline void cleanup() { |
9 |
if (s_opt != NULL) |
10 |
free(s_opt); |
11 |
if (d_opt != NULL) |
12 |
@@ -204,7 +204,7 @@ void usage(const char *progname) { |
13 |
progname); |
14 |
} |
15 |
|
16 |
-inline int del_count(const char *s, const char d) { |
17 |
+static inline int del_count(const char *s, const char d) { |
18 |
int cnt=0, a; |
19 |
for (a=0; s[a] != '\0'; a++) |
20 |
if (s[a] == d) |
21 |
@@ -415,9 +415,10 @@ int main(int argc, char *argv[]) { |
22 |
if (!ints_exists(s_ints, s_cnt)) { |
23 |
free(s_opt); |
24 |
free(s_ints); |
25 |
- if (D) |
26 |
+ if (D) { |
27 |
free(d_opt); |
28 |
free(d_ints); |
29 |
+ } |
30 |
exit(1); |
31 |
} |
32 |
break; |
33 |
@@ -429,9 +430,10 @@ int main(int argc, char *argv[]) { |
34 |
if (!ints_exists(d_ints, d_cnt)) { |
35 |
free(d_opt); |
36 |
free(d_ints); |
37 |
- if (S) |
38 |
+ if (S) { |
39 |
free(s_opt); |
40 |
free(s_ints); |
41 |
+ } |
42 |
exit(1); |
43 |
} |
44 |
break; |