From: tedu Date: Sun, 14 Aug 2016 13:40:55 +0000 (+0000) Subject: replace strtoq with strtoll. ok openbsd X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a43a44b4082114046a01c8786c0447c871003151;p=openbsd replace strtoq with strtoll. ok openbsd --- diff --git a/bin/dd/args.c b/bin/dd/args.c index d61de04c5ce..8b9568dcdbd 100644 --- a/bin/dd/args.c +++ b/bin/dd/args.c @@ -1,4 +1,4 @@ -/* $OpenBSD: args.c,v 1.26 2014/09/14 22:44:47 schwarze Exp $ */ +/* $OpenBSD: args.c,v 1.27 2016/08/14 13:40:55 tedu Exp $ */ /* $NetBSD: args.c,v 1.7 1996/03/01 01:18:58 jtc Exp $ */ /*- @@ -162,13 +162,13 @@ jcl(char **argv) /* * Read and write take size_t's as arguments. Lseek, however, - * takes an off_t (quad). + * takes an off_t. */ if (cbsz > SSIZE_MAX || in.dbsz > SSIZE_MAX || out.dbsz > SSIZE_MAX) errx(1, "buffer sizes cannot be greater than %zd", (ssize_t)SSIZE_MAX); - if (in.offset > QUAD_MAX / in.dbsz || out.offset > QUAD_MAX / out.dbsz) - errx(1, "seek offsets cannot be larger than %qd", QUAD_MAX); + if (in.offset > LLONG_MAX / in.dbsz || out.offset > LLONG_MAX / out.dbsz) + errx(1, "seek offsets cannot be larger than %lld", LLONG_MAX); } static int @@ -406,8 +406,8 @@ get_off(char *val) off_t num, t; char *expr; - num = strtoq(val, &expr, 0); - if (num == QUAD_MAX) /* Overflow. */ + num = strtoll(val, &expr, 0); + if (num == LLONG_MAX) /* Overflow. */ err(1, "%s", oper); if (expr == val) /* No digits. */ errx(1, "%s: illegal numeric value", oper);