Browse code

Use the right struct member

Shawn Webb authored on 2014/05/13 23:39:58
Showing 2 changed files
... ...
@@ -100,8 +100,6 @@ static int isremote(const struct optstruct *opts) {
100 100
 
101 101
     opt = optget(clamdopts, "TCPAddr");
102 102
     while (opt) {
103
-        if (!(opt))
104
-            break;
105 103
         if (strcmp(opt->name, "TCPAddr"))
106 104
             break;
107 105
 
... ...
@@ -160,7 +158,7 @@ static int isremote(const struct optstruct *opts) {
160 160
 
161 161
         freeaddrinfo(info);
162 162
 
163
-        opt = opt->nextarg;
163
+        opt = opt->next;
164 164
     }
165 165
 
166 166
     return 0;
... ...
@@ -94,8 +94,6 @@ int dconnect() {
94 94
 
95 95
     opt = optget(clamdopts, "TCPAddr");
96 96
     while (opt) {
97
-        if (!(opt))
98
-            break;
99 97
         if (strcmp(opt->name, "TCPAddr"))
100 98
             break;
101 99
 
... ...
@@ -105,7 +103,7 @@ int dconnect() {
105 105
         hints.ai_flags = AI_PASSIVE;
106 106
 
107 107
         if ((res = getaddrinfo(opt->strarg, port, &hints, &info))) {
108
-            opt = opt->nextarg;
108
+            opt = opt->next;
109 109
             continue;
110 110
         }
111 111
 
... ...
@@ -126,7 +124,7 @@ int dconnect() {
126 126
 
127 127
         freeaddrinfo(info);
128 128
 
129
-        opt = opt->nextarg;
129
+        opt = opt->next;
130 130
     }
131 131
 
132 132
     return -1;