Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/net-tools:master commit in: lib/
Date: Mon, 21 Nov 2011 01:36:12
Message-Id: 2b4f34b987dbb7a2003219162bab0d61305c95d7.vapier@gentoo
1 commit: 2b4f34b987dbb7a2003219162bab0d61305c95d7
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 21 00:07:40 2011 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 21 00:11:05 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/net-tools.git;a=commit;h=2b4f34b9
7
8 get_sname: constify args/return when possible
9
10 Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
11
12 ---
13 lib/inet.c | 2 +-
14 lib/net-support.h | 2 +-
15 2 files changed, 2 insertions(+), 2 deletions(-)
16
17 diff --git a/lib/inet.c b/lib/inet.c
18 index c0f7efa..8080364 100644
19 --- a/lib/inet.c
20 +++ b/lib/inet.c
21 @@ -416,7 +416,7 @@ static int read_services(void)
22 }
23
24
25 -char *get_sname(int socknumber, char *proto, int numeric)
26 +const char *get_sname(int socknumber, const char *proto, int numeric)
27 {
28 static char buffer[64], init = 0;
29 struct service *item;
30
31 diff --git a/lib/net-support.h b/lib/net-support.h
32 index b79f11b..dae15ac 100644
33 --- a/lib/net-support.h
34 +++ b/lib/net-support.h
35 @@ -124,7 +124,7 @@ extern int ROSE_rinput(int action, int flags, char **argv);
36 extern int aftrans_opt(const char *arg);
37 extern void aftrans_def(char *tool, char *argv0, char *dflt);
38
39 -extern char *get_sname(int socknumber, char *proto, int numeric);
40 +extern const char *get_sname(int socknumber, const char *proto, int numeric);
41
42 extern int flag_unx;
43 extern int flag_ipx;