diff options
-rw-r--r-- | cmd-line-utils/libedit/vi.c | 5 | ||||
-rw-r--r-- | storage/xtradb/buf/buf0buf.c | 2 |
2 files changed, 4 insertions, 3 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: diff --git a/storage/xtradb/buf/buf0buf.c b/storage/xtradb/buf/buf0buf.c index 1e9624fce50..f09354e370f 100644 --- a/storage/xtradb/buf/buf0buf.c +++ b/storage/xtradb/buf/buf0buf.c @@ -2196,7 +2196,7 @@ buf_page_get_gen( ulint fix_type; ibool must_read; ulint retries = 0; - mutex_t* block_mutex; + mutex_t* block_mutex= 0; trx_t* trx = NULL; ulint sec; ulint ms; |