diff options
author | Michael Widenius <monty@askmonty.org> | 2011-02-10 22:53:25 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-02-10 22:53:25 +0200 |
commit | 75fad9dc95646de03b45fc74dca5673809d679a9 (patch) | |
tree | 351570e08c492e8a408783e1b6f0d3f58e17f490 /cmd-line-utils | |
parent | f2ca9c87845655083f186fb0d102699d78c6b22a (diff) | |
download | mariadb-git-75fad9dc95646de03b45fc74dca5673809d679a9.tar.gz |
Fixed compiler warnings
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: |