style - iomenu - interactive terminal-based selection menu HTML git clone git://bitreich.org/iomenu git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/iomenu DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit db81899f43585604025d14656fd05eba47be9060 DIR parent e5026f5e15dba1cd072196edf8a1ead240ab4b2c HTML Author: Josuah Demangeon <mail@josuah.net> Date: Fri, 8 Dec 2017 11:31:10 +0100 style Diffstat: M iomenu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- DIR diff --git a/iomenu.c b/iomenu.c @@ -98,13 +98,13 @@ read_stdin(void) size = BUFSIZ; off = 0; - if (!(buf = malloc(size))) + if ((buf = malloc(size)) == NULL) die("malloc"); while ((len = read(STDIN_FILENO, buf + off, size - off)) > 0) { off += len; if (off >= size >> 1) { size <<= 1; - if (!(buf = realloc(buf, size + 1))) + if ((buf = realloc(buf, size + 1)) == NULL) die("realloc"); } }