=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/main.c,v retrieving revision 1.121 retrieving revision 1.122 diff -c -r1.121 -r1.122 *** src/usr.bin/make/main.c 2016/10/21 16:12:38 1.121 --- src/usr.bin/make/main.c 2017/04/20 03:04:11 1.122 *************** *** 1,4 **** ! /* $OpenBSD: main.c,v 1.121 2016/10/21 16:12:38 espie Exp $ */ /* $NetBSD: main.c,v 1.34 1997/03/24 20:56:36 gwr Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: main.c,v 1.122 2017/04/20 03:04:11 dlg Exp $ */ /* $NetBSD: main.c,v 1.34 1997/03/24 20:56:36 gwr Exp $ */ /* *************** *** 310,323 **** Lst_AtEnd(&makefiles, optarg); break; case 'j': { ! char *endptr; forceJobs = true; ! maxJobs = strtol(optarg, &endptr, 0); ! if (endptr == optarg) { fprintf(stderr, ! "make: illegal argument to -j option -- %s -- not a number\n", ! optarg); usage(); } record_option(c, optarg); --- 310,323 ---- Lst_AtEnd(&makefiles, optarg); break; case 'j': { ! const char *errstr; forceJobs = true; ! maxJobs = strtonum(optarg, 1, INT_MAX, &errstr); ! if (errstr != NULL) { fprintf(stderr, ! "make: illegal argument to -j option" ! " -- %s -- %s\n", optarg, errstr); usage(); } record_option(c, optarg);