From 4bdc914ff97df0cea8d2c7b42bf7f57d5ebb8dcb Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 6 Jan 2019 20:12:16 +0100 Subject: build system: fix compiler warnings Signed-off-by: Denys Vlasenko --- scripts/kconfig/mconf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts/kconfig/mconf.c') diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index adba1141b..c3a837a14 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c @@ -482,7 +482,8 @@ static int exec_conf(void) *argptr++ = NULL; - pipe(pipefd); + if (pipe(pipefd)) + _exit(EXIT_FAILURE); pid = fork(); if (pid == 0) { sigprocmask(SIG_SETMASK, &osset, NULL); @@ -846,9 +847,11 @@ static void conf(struct menu *menu) static void show_textbox(const char *title, const char *text, int r, int c) { int fd; + int len = strlen(text); fd = creat(".help.tmp", 0777); - write(fd, text, strlen(text)); + if (write(fd, text, len) != len) + exit(1); close(fd); show_file(".help.tmp", title, r, c); unlink(".help.tmp"); -- cgit v1.2.3