aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorGravatar Denis Vlasenko <vda.linux@googlemail.com>2007-01-30 00:44:41 +0000
committerGravatar Denis Vlasenko <vda.linux@googlemail.com>2007-01-30 00:44:41 +0000
commit27a131e08e97acc2371421ddab9cf9372acffbb3 (patch)
tree499676f36c1bd490eceb1c127d670f1c2c4f3051 /networking
parenteb10e17b7bfdfe68a2357589ca11956386b0925d (diff)
downloadbusybox-27a131e08e97acc2371421ddab9cf9372acffbb3.tar.gz
busybox-27a131e08e97acc2371421ddab9cf9372acffbb3.tar.bz2
preparatory patch for -Wwrite-strings #8 (missed part)
Diffstat (limited to 'networking')
-rw-r--r--networking/libiproute/ll_types.c9
-rw-r--r--networking/libiproute/rt_names.h7
2 files changed, 7 insertions, 9 deletions
diff --git a/networking/libiproute/ll_types.c b/networking/libiproute/ll_types.c
index a53c89432..416ea6bbe 100644
--- a/networking/libiproute/ll_types.c
+++ b/networking/libiproute/ll_types.c
@@ -11,17 +11,16 @@
*/
#include <stdio.h>
#include <arpa/inet.h>
-
#include <linux/if_arp.h>
#include "rt_names.h"
-const char * ll_type_n2a(int type, char *buf, int len)
+const char* ll_type_n2a(int type, char *buf, int len)
{
#define __PF(f,n) { ARPHRD_##f, #n },
-static struct {
+static const struct {
int type;
- char *name;
+ const char *name;
} arphrd_names[] = {
{ 0, "generic" },
__PF(ETHER,ether)
@@ -109,7 +108,7 @@ __PF(VOID,void)
#undef __PF
int i;
- for (i=0; i<sizeof(arphrd_names)/sizeof(arphrd_names[0]); i++) {
+ for (i = 0; i < sizeof(arphrd_names)/sizeof(arphrd_names[0]); i++) {
if (arphrd_names[i].type == type)
return arphrd_names[i].name;
}
diff --git a/networking/libiproute/rt_names.h b/networking/libiproute/rt_names.h
index 92b807f3d..98c22b0b0 100644
--- a/networking/libiproute/rt_names.h
+++ b/networking/libiproute/rt_names.h
@@ -16,14 +16,13 @@ extern int rtnl_dsfield_a2n(uint32_t *id, char *arg);
extern int rtnl_rttable_a2n(uint32_t *id, char *arg);
-extern const char * ll_type_n2a(int type, char *buf, int len);
+extern const char* ll_type_n2a(int type, char *buf, int len);
-extern const char *ll_addr_n2a(unsigned char *addr, int alen, int type,
+extern const char* ll_addr_n2a(unsigned char *addr, int alen, int type,
char *buf, int blen);
extern int ll_addr_a2n(unsigned char *lladdr, int len, char *arg);
-extern const char * ll_proto_n2a(unsigned short id, char *buf, int len);
+extern const char* ll_proto_n2a(unsigned short id, char *buf, int len);
extern int ll_proto_a2n(unsigned short *id, char *buf);
-
#endif