Browse code

always pass a NULL *tz to gettimeofday

aCaB authored on 2009/10/13 06:38:38
Showing 2 changed files
... ...
@@ -55,7 +55,6 @@ int main(int argc, char **argv)
55 55
 {
56 56
 	int ds, dms, ret, infected = 0;
57 57
 	struct timeval t1, t2;
58
-	struct timezone tz;
59 58
 	time_t starttime;
60 59
         struct optstruct *opts;
61 60
         const struct optstruct *opt;
... ...
@@ -127,13 +126,13 @@ int main(int argc, char **argv)
127 127
     time(&starttime);
128 128
     /* ctime() does \n, but I need it once more */
129 129
 
130
-    gettimeofday(&t1, &tz);
130
+    gettimeofday(&t1, NULL);
131 131
 
132 132
     ret = client(opts, &infected);
133 133
 
134 134
     /* TODO: Implement STATUS in clamd */
135 135
     if((infected || ret != 2) && !optget(opts, "no-summary")->enabled) {
136
-	gettimeofday(&t2, &tz);
136
+	gettimeofday(&t2, NULL);
137 137
 	ds = t2.tv_sec - t1.tv_sec;
138 138
 	dms = t2.tv_usec - t1.tv_usec;
139 139
 	ds -= (dms < 0) ? (1):(0);
... ...
@@ -60,7 +60,6 @@ int main(int argc, char **argv)
60 60
 	int ds, dms, ret;
61 61
 	double mb, rmb;
62 62
 	struct timeval t1, t2;
63
-	struct timezone tz;
64 63
 #ifndef _WIN32
65 64
 	sigset_t sigset;
66 65
 #endif
... ...
@@ -143,12 +142,12 @@ int main(int argc, char **argv)
143 143
 
144 144
     memset(&info, 0, sizeof(struct s_info));
145 145
 
146
-    gettimeofday(&t1, &tz);
146
+    gettimeofday(&t1, NULL);
147 147
 
148 148
     ret = scanmanager(opts);
149 149
 
150 150
     if(!optget(opts, "no-summary")->enabled) {
151
-	gettimeofday(&t2, &tz);
151
+	gettimeofday(&t2, NULL);
152 152
 
153 153
     ds = t2.tv_sec - t1.tv_sec;
154 154
 	dms = t2.tv_usec - t1.tv_usec;