build system: fix compiler warnings

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2019-01-06 20:12:16 +01:00
parent 2d9e097963
commit 4bdc914ff9
5 changed files with 13 additions and 7 deletions

View File

@ -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");