diff options
author | Leah Neukirchen <leah@vuxu.org> | 2019-08-06 17:46:45 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2019-08-06 17:46:45 +0200 |
commit | 2a9d46ad206f7cb2f9d6acf0b01445851ea8b215 (patch) | |
tree | 92b8181aada61dc39d64f448cf0f08f551024d4e /src/usr.bin/jot/jot.c | |
parent | 3a7302d2c68412db76c46df62a5c0f2e10626cb9 (diff) | |
download | outils-2a9d46ad206f7cb2f9d6acf0b01445851ea8b215.tar.gz outils-2a9d46ad206f7cb2f9d6acf0b01445851ea8b215.tar.xz outils-2a9d46ad206f7cb2f9d6acf0b01445851ea8b215.zip |
cvs update
Diffstat (limited to 'src/usr.bin/jot/jot.c')
-rw-r--r-- | src/usr.bin/jot/jot.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/usr.bin/jot/jot.c b/src/usr.bin/jot/jot.c index 99c1d66..c84a8cb 100644 --- a/src/usr.bin/jot/jot.c +++ b/src/usr.bin/jot/jot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: jot.c,v 1.48 2018/08/01 13:35:33 tb Exp $ */ +/* $OpenBSD: jot.c,v 1.49 2019/06/27 18:03:36 deraadt Exp $ */ /* $NetBSD: jot.c,v 1.3 1994/12/02 20:29:43 pk Exp $ */ /*- @@ -357,14 +357,14 @@ getformat(void) p += 2; if (p == NULL && !chardata) { - if (asprintf(&format, "%s%%.%df", format, prec) < 0) + if (asprintf(&format, "%s%%.%df", format, prec) == -1) err(1, NULL); } else if (p == NULL && chardata) { - if (asprintf(&format, "%s%%c", format) < 0) + if (asprintf(&format, "%s%%c", format) == -1) err(1, NULL); } else if (p[1] == '\0') { /* cannot end in single '%' */ - if (asprintf(&format, "%s%%", format) < 0) + if (asprintf(&format, "%s%%", format) == -1) err(1, NULL); } else { /* @@ -447,7 +447,7 @@ fmt_broken: if (p[1] != '\0') errx(1, "too many conversions"); /* cannot end in single '%' */ - if (asprintf(&format, "%s%%", format) < 0) + if (asprintf(&format, "%s%%", format) == -1) err(1, NULL); } } |