From a43a44b4082114046a01c8786c0447c871003151 Mon Sep 17 00:00:00 2001 From: tedu Date: Sun, 14 Aug 2016 13:40:55 +0000 Subject: [PATCH] replace strtoq with strtoll. ok openbsd --- bin/dd/args.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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); -- 2.20.1