aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-11-20 19:07:40 -0500
committerMike Frysinger <vapier@gentoo.org>2011-11-20 19:11:05 -0500
commit2b4f34b987dbb7a2003219162bab0d61305c95d7 (patch)
tree6135df3d12563d1c4774baf33ec083e87f3e8101
parentfix path to net-features.h (diff)
downloadnet-tools-2b4f34b987dbb7a2003219162bab0d61305c95d7.tar.gz
net-tools-2b4f34b987dbb7a2003219162bab0d61305c95d7.tar.bz2
net-tools-2b4f34b987dbb7a2003219162bab0d61305c95d7.zip
get_sname: constify args/return when possible
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--lib/inet.c2
-rw-r--r--lib/net-support.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/inet.c b/lib/inet.c
index c0f7efa..8080364 100644
--- a/lib/inet.c
+++ b/lib/inet.c
@@ -416,7 +416,7 @@ static int read_services(void)
}
-char *get_sname(int socknumber, char *proto, int numeric)
+const char *get_sname(int socknumber, const char *proto, int numeric)
{
static char buffer[64], init = 0;
struct service *item;
diff --git a/lib/net-support.h b/lib/net-support.h
index b79f11b..dae15ac 100644
--- a/lib/net-support.h
+++ b/lib/net-support.h
@@ -124,7 +124,7 @@ extern int ROSE_rinput(int action, int flags, char **argv);
extern int aftrans_opt(const char *arg);
extern void aftrans_def(char *tool, char *argv0, char *dflt);
-extern char *get_sname(int socknumber, char *proto, int numeric);
+extern const char *get_sname(int socknumber, const char *proto, int numeric);
extern int flag_unx;
extern int flag_ipx;