Skip to content

Commit

Permalink
af.h/c: make several structs const
Browse files Browse the repository at this point in the history
  • Loading branch information
krajaratnam committed Feb 20, 2010
1 parent 6457f82 commit 2086d80
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions addrtoname.c
Expand Up @@ -768,7 +768,7 @@ init_protoidarray(void)
{
register int i;
register struct protoidmem *tp;
struct protoidlist *pl;
const struct protoidlist *pl;
u_char protoid[5];

protoid[0] = 0;
Expand Down Expand Up @@ -817,7 +817,7 @@ static const struct etherlist {
static void
init_etherarray(void)
{
register struct etherlist *el;
register const struct etherlist *el;
register struct enamemem *tp;
#ifdef USE_ETHER_NTOHOST
char name[256];
Expand Down
4 changes: 2 additions & 2 deletions af.c
Expand Up @@ -28,7 +28,7 @@ static const char rcsid[] _U_ =
#include "interface.h"
#include "af.h"

struct tok af_values[] = {
const struct tok af_values[] = {
{ 0, "Reserved"},
{ AFNUM_INET, "IPv4"},
{ AFNUM_INET6, "IPv6"},
Expand All @@ -50,7 +50,7 @@ struct tok af_values[] = {
{ 0, NULL},
};

struct tok bsd_af_values[] = {
const struct tok bsd_af_values[] = {
{ BSD_AFNUM_INET, "IPv4" },
{ BSD_AFNUM_NS, "NS" },
{ BSD_AFNUM_ISO, "ISO" },
Expand Down
4 changes: 2 additions & 2 deletions af.h
Expand Up @@ -17,8 +17,8 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/

extern struct tok af_values[];
extern struct tok bsd_af_values[];
extern const struct tok af_values[];
extern const struct tok bsd_af_values[];

/* RFC1700 address family numbers */
#define AFNUM_INET 1
Expand Down

0 comments on commit 2086d80

Please sign in to comment.