diff options
author | Piotr Pawel Stefaniak <pstef@FreeBSD.org> | 2018-06-03 17:05:55 +0000 |
---|---|---|
committer | Piotr Pawel Stefaniak <pstef@FreeBSD.org> | 2018-06-03 17:05:55 +0000 |
commit | 33c2464207beacc032cca0b2933dd9e2a5025afe (patch) | |
tree | dc5ee8b7b61b2c8cacb11d4c8c97f3f3f23c0d8f /usr.bin/indent | |
parent | e1baf57e4b537876b695168c51bb8fd10f7f64f3 (diff) | |
download | src-33c2464207beacc032cca0b2933dd9e2a5025afe.tar.gz src-33c2464207beacc032cca0b2933dd9e2a5025afe.zip |
indent(1): use errx() instead of abort()
Notes
Notes:
svn path=/head/; revision=334569
Diffstat (limited to 'usr.bin/indent')
-rw-r--r-- | usr.bin/indent/indent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/indent/indent.c b/usr.bin/indent/indent.c index e9902e8a300b..e6a83a8a84a7 100644 --- a/usr.bin/indent/indent.c +++ b/usr.bin/indent/indent.c @@ -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--; |