From 28355a36da6ad4d1b55ba9bb146fb0b6586e7edb Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 7 May 2001 17:48:28 +0000 Subject: Per some comments from Lars Kellogg-Stedman , make xreadlink() return NULL on failure, and make sure everyone uses the interface correctly. -Erik --- applets/busybox.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'applets') diff --git a/applets/busybox.c b/applets/busybox.c index badd53d79..41b6069ed 100644 --- a/applets/busybox.c +++ b/applets/busybox.c @@ -37,10 +37,7 @@ typedef int (*__link_f)(const char *, const char *); */ static char *busybox_fullpath() { - char proc[256]; - - sprintf(proc, "/proc/%d/exe", getpid()); - return xreadlink(proc); + return xreadlink("/proc/self/exe"); } /* create (sym)links for each applet */ -- cgit v1.2.3