Adjust some limits to more flexibility for strtonum

This commit is contained in:
FRIGN
2015-02-01 01:24:03 +01:00
parent 5a20d0e9d7
commit 27b770c02c
10 changed files with 110 additions and 110 deletions

3
fold.c
View File

@@ -1,6 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <ctype.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -84,7 +85,7 @@ main(int argc, char *argv[])
sflag = 1;
break;
case 'w':
width = estrtonum(EARGF(usage()), 1, LLONG_MAX);
width = estrtonum(EARGF(usage()), 1, MIN(LLONG_MAX, SIZE_MAX));
break;
ARGNUM:
width = ARGNUMF();