diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-11-09 17:16:55 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-11-09 17:16:55 +0000 |
commit | 114645560ccb137345760502cff17bf26257a09e (patch) | |
tree | 6649ec0891948c032983ffe73b14a0c0669f34c8 /avahi-compat-libdns_sd/warn.c | |
parent | f2747e8c9adc1e3ca04630d35c9825ec715078e9 (diff) |
simplify some lines
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@942 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-compat-libdns_sd/warn.c')
-rw-r--r-- | avahi-compat-libdns_sd/warn.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/avahi-compat-libdns_sd/warn.c b/avahi-compat-libdns_sd/warn.c index 0f7f6dc..8d766c3 100644 --- a/avahi-compat-libdns_sd/warn.c +++ b/avahi-compat-libdns_sd/warn.c @@ -59,11 +59,8 @@ const char *avahi_exe_name(void) { if (exe_name[0] == 0) { int k; - char fn[64]; - snprintf(fn, sizeof(fn), "/proc/%lu/exe", (unsigned long) getpid()); - - if ((k = readlink(fn, exe_name, sizeof(exe_name)-1)) < 0) + if ((k = readlink("/proc/self/exe", exe_name, sizeof(exe_name)-1)) < 0) snprintf(exe_name, sizeof(exe_name), "(unknown)"); else { char *slash; @@ -132,6 +129,3 @@ void avahi_warn_unsupported(const char *function) { avahi_warn("Please fix your application to use the native API of Avahi!"); avahi_warn("For more information see <http://0pointer.de/avahi-compat?s="CGI_SUBSYSTEM"&e=%s&f=%s>", avahi_exe_name(), function); } - - - |