aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkraxel <kraxel>2007-12-03 10:23:18 +0000
committerkraxel <kraxel>2007-12-03 10:23:18 +0000
commit96d917d42505c657b832dcc2f8855b3ecd5d7518 (patch)
treedda3b14eb91d545b2844f1a8eb24170792187dd2
parent2ce155bd0c6da70fdec714c3b07cffb3b05125ba (diff)
downloadfbida-96d917d42505c657b832dcc2f8855b3ecd5d7518.tar.gz
fixup last patch
-rw-r--r--fbi.c7
1 files 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;
}