Browse Source

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

Timo Reimann 14 years ago
parent
commit
5a6a30cd34
1 changed files with 3 additions and 2 deletions
  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 */