浏览代码

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

Timo Reimann 14 年之前
父节点
当前提交
5a6a30cd34
共有 1 个文件被更改,包括 3 次插入2 次删除
  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 */