aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-14 13:36:48 +1000
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-14 13:36:48 +1000
commit6e55663080e33d1856d949d60e45b135f2613087 (patch)
tree7318387028176038ca96344831febb30a582d661 /coreutils
parentc6933c626b97c3f6bc446586ee2e6c7d9930c938 (diff)
parentdcaed97e0f44d0cd285fb590ec6ec80d0d73e738 (diff)
downloadbusybox-w32-6e55663080e33d1856d949d60e45b135f2613087.tar.gz
busybox-w32-6e55663080e33d1856d949d60e45b135f2613087.tar.bz2
busybox-w32-6e55663080e33d1856d949d60e45b135f2613087.zip
Merge branch 'origin/master' (early part)
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/cut.c4
-rw-r--r--coreutils/date.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/cut.c b/coreutils/cut.c
index 696478bb2..b7a3cfabb 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -224,7 +224,7 @@ int cut_main(int argc UNUSED_PARAM, char **argv)
224 if (!ntok[0]) { 224 if (!ntok[0]) {
225 s = BOL; 225 s = BOL;
226 } else { 226 } else {
227 s = xatoi_u(ntok); 227 s = xatoi_positive(ntok);
228 /* account for the fact that arrays are zero based, while 228 /* account for the fact that arrays are zero based, while
229 * the user expects the first char on the line to be char #1 */ 229 * the user expects the first char on the line to be char #1 */
230 if (s != 0) 230 if (s != 0)
@@ -237,7 +237,7 @@ int cut_main(int argc UNUSED_PARAM, char **argv)
237 } else if (!ltok[0]) { 237 } else if (!ltok[0]) {
238 e = EOL; 238 e = EOL;
239 } else { 239 } else {
240 e = xatoi_u(ltok); 240 e = xatoi_positive(ltok);
241 /* if the user specified and end position of 0, 241 /* if the user specified and end position of 0,
242 * that means "til the end of the line" */ 242 * that means "til the end of the line" */
243 if (e == 0) 243 if (e == 0)
diff --git a/coreutils/date.c b/coreutils/date.c
index cb41724af..3ce352c8d 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -300,7 +300,7 @@ int date_main(int argc UNUSED_PARAM, char **argv)
300 scale = 1; 300 scale = 1;
301 pres = 9; 301 pres = 9;
302 if (n) { 302 if (n) {
303 pres = xatoi_u(p); 303 pres = xatoi_positive(p);
304 if (pres == 0) 304 if (pres == 0)
305 pres = 9; 305 pres = 9;
306 m = 9 - pres; 306 m = 9 - pres;