myadm

Simple MySQL client for the terminal
git clone git://git.bitsmanent.org/myadm
Log | Files | Refs | README | LICENSE

commit 9c60b6286fe1f0b58671f791d17ad320d121f3b3
parent 61092e9793916d82c90a2950843e1bcb889ac8f4
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Mon, 25 Apr 2016 15:13:32 +0200

Check fput() return value.

Diffstat:
Mmyadm.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/myadm.c b/myadm.c @@ -298,7 +298,8 @@ editbuf(char *in, int len, int *sz) { close(fd); a.v = (const char*[]){"/bin/sh", "-c", "$EDITOR \"$0\"", tmp, NULL}; - fput(tmp, in, len); + if(fput(tmp, in, len) == -1) + return NULL; spawn(&a); wait(NULL); curs_set(1); curs_set(0); /* XXX Investigate... */