Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
net-tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
net-tools
Commits
2e15dacb
Commit
2e15dacb
authored
Aug 25, 2015
by
Mike Frysinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: af/hw: constify name fields
These strings are static data set in sub-modules and never modified.
parent
738c8340
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
lib/af.c
lib/af.c
+1
-1
lib/hw.c
lib/hw.c
+1
-1
lib/net-support.h
lib/net-support.h
+5
-5
No files found.
lib/af.c
View file @
2e15dacb
...
@@ -320,7 +320,7 @@ int aftrans_opt(const char *arg)
...
@@ -320,7 +320,7 @@ int aftrans_opt(const char *arg)
/* type: 0=all, 1=getroute */
/* type: 0=all, 1=getroute */
void
print_aflist
(
int
type
)
{
void
print_aflist
(
int
type
)
{
int
count
=
0
;
int
count
=
0
;
char
*
txt
;
c
onst
c
har
*
txt
;
struct
aftype
**
afp
;
struct
aftype
**
afp
;
if
(
!
sVafinit
)
if
(
!
sVafinit
)
...
...
lib/hw.c
View file @
2e15dacb
...
@@ -274,7 +274,7 @@ struct hwtype *get_hwntype(int type)
...
@@ -274,7 +274,7 @@ struct hwtype *get_hwntype(int type)
/* type: 0=all, 1=ARPable */
/* type: 0=all, 1=ARPable */
void
print_hwlist
(
int
type
)
{
void
print_hwlist
(
int
type
)
{
int
count
=
0
;
int
count
=
0
;
char
*
txt
;
c
onst
c
har
*
txt
;
struct
hwtype
**
hwp
;
struct
hwtype
**
hwp
;
if
(
!
sVhwinit
)
if
(
!
sVhwinit
)
...
...
lib/net-support.h
View file @
2e15dacb
...
@@ -34,8 +34,8 @@
...
@@ -34,8 +34,8 @@
/* This structure defines protocol families and their handlers. */
/* This structure defines protocol families and their handlers. */
struct
aftype
{
struct
aftype
{
char
*
name
;
c
onst
c
har
*
name
;
char
*
title
;
c
onst
c
har
*
title
;
int
af
;
int
af
;
int
alen
;
int
alen
;
const
char
*
(
*
print
)
(
const
char
*
);
const
char
*
(
*
print
)
(
const
char
*
);
...
@@ -49,15 +49,15 @@ struct aftype {
...
@@ -49,15 +49,15 @@ struct aftype {
int
(
*
getmask
)
(
char
*
src
,
struct
sockaddr
*
mask
,
char
*
name
);
int
(
*
getmask
)
(
char
*
src
,
struct
sockaddr
*
mask
,
char
*
name
);
int
fd
;
int
fd
;
char
*
flag_file
;
c
onst
c
har
*
flag_file
;
};
};
extern
struct
aftype
*
aftypes
[];
extern
struct
aftype
*
aftypes
[];
/* This structure defines hardware protocols and their handlers. */
/* This structure defines hardware protocols and their handlers. */
struct
hwtype
{
struct
hwtype
{
char
*
name
;
c
onst
c
har
*
name
;
char
*
title
;
c
onst
c
har
*
title
;
int
type
;
int
type
;
int
alen
;
int
alen
;
const
char
*
(
*
print
)
(
const
char
*
);
const
char
*
(
*
print
)
(
const
char
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment