diff options
author | Michael Widenius <monty@askmonty.org> | 2011-02-10 23:02:16 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-02-10 23:02:16 +0200 |
commit | 7e497abcfb3e761ba5a368316192ae930fb58f6b (patch) | |
tree | 26eb2c2834c600dd240a93205a8a7d06fd0f9449 /cmd-line-utils | |
parent | 4c4c0226a0bb43393b612c2a9a95dcbcae9e84d5 (diff) | |
parent | 75fad9dc95646de03b45fc74dca5673809d679a9 (diff) | |
download | mariadb-git-7e497abcfb3e761ba5a368316192ae930fb58f6b.tar.gz |
Automatic merge with trunk
Diffstat (limited to 'cmd-line-utils')
-rw-r--r-- | cmd-line-utils/libedit/vi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd-line-utils/libedit/vi.c b/cmd-line-utils/libedit/vi.c index d628f076a1d..b1827fc98f1 100644 --- a/cmd-line-utils/libedit/vi.c +++ b/cmd-line-utils/libedit/vi.c @@ -1012,8 +1012,9 @@ vi_histedit(EditLine *el, int c __attribute__((__unused__))) if (fd < 0) return CC_ERROR; cp = el->el_line.buffer; - write(fd, cp, el->el_line.lastchar - cp +0u); - write(fd, "\n", 1); + if (write(fd, cp, el->el_line.lastchar - cp +0u) == -1 || + write(fd, "\n", 1) == -1) + return CC_ERROR; pid = fork(); switch (pid) { case -1: |