From 96d917d42505c657b832dcc2f8855b3ecd5d7518 Mon Sep 17 00:00:00 2001 From: kraxel Date: Mon, 3 Dec 2007 10:23:18 +0000 Subject: fixup last patch --- fbi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fbi.c b/fbi.c index f54a1fb..43934de 100644 --- a/fbi.c +++ b/fbi.c @@ -637,7 +637,6 @@ static void free_image(struct ida_image *img) static struct ida_image* read_image(char *filename) { - char command[1024]; struct ida_loader *loader = NULL; struct ida_image *img; struct list_head *item; @@ -675,17 +674,17 @@ read_image(char *filename) perror("fork"); close(p[0]); close(p[1]); - return(NULL); + return NULL; case 0: /* child */ dup2(p[1], 1 /* stdout */); close(p[0]); close(p[1]); - execl("convert", "convert", "-depth", "8", filename, "ppm:-", NULL); + execlp("convert", "convert", "-depth", "8", filename, "ppm:-", NULL); exit(1); default: /* parent */ close(p[1]); fp = fdopen(p[0], "r"); - if (NULL == (fp = popen(command,"r"))) + if (NULL == fp) return NULL; loader = &ppm_loader; } -- cgit