mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 00:55:11 +00:00
preparatory patch for -Wwrite-strings #8 (missed part)
This commit is contained in:
parent
eb10e17b7b
commit
27a131e08e
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user