svn commit: r334569 - head/usr.bin/indent
Piotr Pawel Stefaniak
pstef at FreeBSD.org
Sun Jun 3 17:05:56 UTC 2018
Author: pstef
Date: Sun Jun 3 17:05:55 2018
New Revision: 334569
URL: https://svnweb.freebsd.org/changeset/base/334569
Log:
indent(1): use errx() instead of abort()
Modified:
head/usr.bin/indent/indent.c
Modified: head/usr.bin/indent/indent.c
==============================================================================
--- head/usr.bin/indent/indent.c Sun Jun 3 17:03:55 2018 (r334568)
+++ head/usr.bin/indent/indent.c Sun Jun 3 17:05:55 2018 (r334569)
@@ -495,7 +495,7 @@ main(int argc, char **argv)
while (*buf_ptr == ' ' || *buf_ptr == '\t') {
*sc_end++ = *buf_ptr++;
if (sc_end >= &save_com[sc_size]) {
- abort();
+ errx(1, "input too long");
}
}
if (buf_ptr >= buf_end) {
@@ -1196,7 +1196,7 @@ check_type:
bcopy(s_lab + com_start, sc_end, com_end - com_start);
sc_end += com_end - com_start;
if (sc_end >= &save_com[sc_size])
- abort();
+ errx(1, "input too long");
e_lab = s_lab + com_start;
while (e_lab > s_lab && (e_lab[-1] == ' ' || e_lab[-1] == '\t'))
e_lab--;
More information about the svn-src-all
mailing list