diff options
author | 2011-04-20 01:35:22 +0000 | |
---|---|---|
committer | 2011-04-20 01:35:22 +0000 | |
commit | 11310f89de97e5adc31462647fe360a9bf970c26 (patch) | |
tree | ee1ea3d588b2064836976ce2dacd487cf036c093 | |
parent | netstat: split host resolution out from --numeric-ports (diff) | |
download | net-tools-11310f89de97e5adc31462647fe360a9bf970c26.tar.gz net-tools-11310f89de97e5adc31462647fe360a9bf970c26.tar.bz2 net-tools-11310f89de97e5adc31462647fe360a9bf970c26.zip |
patch from Bert Wesarg to separate basename of -p only if it is absulote
path (in order to make argv[0]="sshd pty/0" display as sshd, and not as /0.
-rw-r--r-- | netstat.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6,7 +6,7 @@ * NET-3 Networking Distribution for the LINUX operating * system. * - * Version: $Id: netstat.c,v 1.72 2011-04-09 13:57:28 vapier Exp $ + * Version: $Id: netstat.c,v 1.73 2011-04-20 01:35:22 ecki Exp $ * * Authors: Fred Baumgarten, <dc6iq@insu1.etec.uni-karlsruhe.de> * Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> @@ -420,7 +420,7 @@ static void prg_cache_load(void) continue; if (cmdllen < sizeof(cmdlbuf) - 1) cmdlbuf[cmdllen]='\0'; - if ((cmdlp = strrchr(cmdlbuf, '/'))) + if (cmdlbuf[0] == '/' && (cmdlp = strrchr(cmdlbuf, '/'))) cmdlp++; else cmdlp = cmdlbuf; |