Browse code

acc(k): Replace call to (deprecated) atoi() function with strtol().

Timo Reimann authored on 27/09/2011 22:28:05
Showing 1 changed files
... ...
@@ -237,8 +237,9 @@ static struct timeval time_from_string( str* time_value)
237 237
         return time_error;
238 238
     }
239 239
     
240
-    return (struct timeval) { atoi( zero_terminated_value),
241
-                            atoi( dot_address + 1)};
240
+    time_res->tv_sec = strtol( zero_terminated_value, (char **)NULL, 10);
241
+    time_res->tv_usec = strtol( dot_address + 1, (char **)NULL, 10);
242
+    return 0;
242 243
 }
243 244
 
244 245
 /* set the duration in the dialog struct */