diff options
author | Mark Lumsden <lum@cvs.openbsd.org> | 2015-12-30 20:51:52 +0000 |
---|---|---|
committer | Mark Lumsden <lum@cvs.openbsd.org> | 2015-12-30 20:51:52 +0000 |
commit | 7a3884340f70c64ff21dece383e57160136e8066 (patch) | |
tree | eed99bf81fa4cae7af19d8ce1f7280bd0df0beda /usr.bin/mg | |
parent | 99bca3c60640d810673344f4a4bf067cb18f58c4 (diff) |
Small tidy of recently committed transpose-words: unused value
assignment and I missed an ABORT case.
Diffstat (limited to 'usr.bin/mg')
-rw-r--r-- | usr.bin/mg/word.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/mg/word.c b/usr.bin/mg/word.c index dd1bf349076..4a4d898cebb 100644 --- a/usr.bin/mg/word.c +++ b/usr.bin/mg/word.c @@ -1,4 +1,4 @@ -/* $OpenBSD: word.c,v 1.18 2015/12/29 19:44:32 lum Exp $ */ +/* $OpenBSD: word.c,v 1.19 2015/12/30 20:51:51 lum Exp $ */ /* This file is in the public domain. */ @@ -119,7 +119,6 @@ transposeword(int f, int n) free(word1); return (FALSE); } - tmp_len = strlen(word1); while (n-- > 0) { i = 0; @@ -155,7 +154,7 @@ transposeword(int f, int n) tmp2_w_dotp = curwp->w_dotp; ret = grabword(&word2); - if (ret < 0) { + if (ret < 0 || ret == ABORT) { dobeep(); ewprintf("Error copying word: %s", strerror(ret)); free(word1); |