Explorar o código

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

Timo Reimann %!s(int64=14) %!d(string=hai) anos
pai
achega
5a6a30cd34
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      modules_k/acc/acc_cdr.c

+ 3 - 2
modules_k/acc/acc_cdr.c

@@ -237,8 +237,9 @@ static struct timeval time_from_string( str* time_value)
         return time_error;
     }
     
-    return (struct timeval) { atoi( zero_terminated_value),
-                            atoi( dot_address + 1)};
+    time_res->tv_sec = strtol( zero_terminated_value, (char **)NULL, 10);
+    time_res->tv_usec = strtol( dot_address + 1, (char **)NULL, 10);
+    return 0;
 }
 
 /* set the duration in the dialog struct */