提交 12ae4dfc 编写于 作者: R Roberto Sassu

Replace atoi() with strtol()

上级 b1219834
......@@ -392,7 +392,7 @@ int generator(int dirfd, int pos, struct list_head *head_in,
continue;
if (path_list_ext) {
st.st_mode = atoi(cur->attrs[1]);
st.st_mode = strtol(cur->attrs[1], NULL, 10);
st.st_uid = 0;
pwd = getpwnam(cur->attrs[2]);
if (pwd)
......
......@@ -397,7 +397,7 @@ int generator(int dirfd, int pos, struct list_head *head_in,
continue;
if (path_list_ext) {
st.st_mode = atoi(cur->attrs[1]);
st.st_mode = strtol(cur->attrs[1], NULL, 10);
st.st_uid = 0;
pwd = getpwnam(cur->attrs[2]);
if (pwd)
......
......@@ -215,7 +215,7 @@ int main(int argc, char **argv)
}
break;
case 'p':
pos = atoi(optarg);
pos = strtol(optarg, NULL, 10);
break;
case 't':
for (i = 0; i < COMPACT__LAST; i++)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册