Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
96f3d827
Commit
96f3d827
authored
Dec 18, 2002
by
Leigh B. Stoller
Browse files
Fix -Wall warnings.
parent
f568dc59
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmcd/findif.c
View file @
96f3d827
...
...
@@ -149,7 +149,7 @@ find_iface(char *macaddr)
static
int
find_iface
(
char
*
macaddr
)
{
int
sock
,
i
;
int
sock
;
struct
ifreq
ifrbuf
,
*
ifr
=
&
ifrbuf
;
FILE
*
fp
;
char
buf
[
BUFSIZ
],
*
bp
,
enet
[
BUFSIZ
];
...
...
@@ -175,8 +175,8 @@ find_iface(char *macaddr)
while
(
fgets
(
buf
,
sizeof
(
buf
),
fp
))
{
sscanf
(
buf
,
"%s:"
,
ifr
->
ifr_name
);
if
(
bp
=
strchr
(
ifr
->
ifr_name
,
':'
))
*
bp
=
(
char
*
)
0
;
if
(
(
bp
=
strchr
(
ifr
->
ifr_name
,
':'
))
)
*
bp
=
'\0'
;
ifr
->
ifr_addr
.
sa_family
=
AF_INET
;
if
(
ioctl
(
sock
,
SIOCGIFHWADDR
,
ifr
)
<
0
)
...
...
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