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
ca46fb15
Commit
ca46fb15
authored
Dec 10, 2011
by
Mike Frysinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ignore return value of fgets calls we dont care about
Signed-off-by:
Mike Frysinger
<
vapier@gentoo.org
>
parent
153ab835
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
30 additions
and
15 deletions
+30
-15
ipmaddr.c
ipmaddr.c
+2
-1
iptunnel.c
iptunnel.c
+4
-2
lib/ax25_gr.c
lib/ax25_gr.c
+2
-1
lib/ddp_gr.c
lib/ddp_gr.c
+2
-1
lib/interface.c
lib/interface.c
+4
-2
lib/ipx_gr.c
lib/ipx_gr.c
+2
-1
lib/netrom_gr.c
lib/netrom_gr.c
+4
-2
lib/rose_gr.c
lib/rose_gr.c
+2
-1
lib/x25_gr.c
lib/x25_gr.c
+2
-1
netstat.c
netstat.c
+6
-3
No files found.
ipmaddr.c
View file @
ca46fb15
...
...
@@ -181,7 +181,8 @@ void read_igmp(struct ma_info **result_p)
if
(
!
fp
)
return
;
memset
(
&
m
,
0
,
sizeof
(
m
));
fgets
(
buf
,
sizeof
(
buf
),
fp
);
if
(
fgets
(
buf
,
sizeof
(
buf
),
fp
))
/* eat line */
;
m
.
addr
.
family
=
AF_INET
;
m
.
addr
.
bitlen
=
32
;
...
...
iptunnel.c
View file @
ca46fb15
...
...
@@ -476,8 +476,10 @@ static int do_tunnels_list(struct ip_tunnel_parm *p)
return
-
1
;
}
fgets
(
buf
,
sizeof
(
buf
),
fp
);
fgets
(
buf
,
sizeof
(
buf
),
fp
);
if
(
fgets
(
buf
,
sizeof
(
buf
),
fp
))
/* eat line */
;
if
(
fgets
(
buf
,
sizeof
(
buf
),
fp
))
/* eat line */
;
while
(
fgets
(
buf
,
sizeof
(
buf
),
fp
)
!=
NULL
)
{
char
*
ptr
;
...
...
lib/ax25_gr.c
View file @
ca46fb15
...
...
@@ -49,7 +49,8 @@ int AX25_rprint(int options)
}
printf
(
_
(
"Kernel AX.25 routing table
\n
"
));
/* xxx */
printf
(
_
(
"Destination Iface Use
\n
"
));
/* xxx */
fgets
(
buffer
,
256
,
f
);
if
(
fgets
(
buffer
,
256
,
f
))
/* eat line */
;
while
(
fgets
(
buffer
,
256
,
f
))
{
buffer
[
9
]
=
0
;
buffer
[
14
]
=
0
;
...
...
lib/ddp_gr.c
View file @
ca46fb15
...
...
@@ -73,7 +73,8 @@ int DDP_rprint(int options)
return
1
;
}
fscanf
(
fp
,
"%as %as %as %as
\n
"
,
&
dest
,
&
gw
,
&
flags
,
&
dev
);
if
(
fscanf
(
fp
,
"%as %as %as %as
\n
"
,
&
dest
,
&
gw
,
&
flags
,
&
dev
))
/* eat line */
;
free
(
dest
);
free
(
gw
);
free
(
dev
);
free
(
flags
);
printf
(
"%s
\n
"
,
hdr
);
...
...
lib/interface.c
View file @
ca46fb15
...
...
@@ -326,8 +326,10 @@ static int if_readlist_proc(char *target)
_PATH_PROCNET_DEV
,
strerror
(
errno
));
return
-
2
;
}
fgets
(
buf
,
sizeof
buf
,
fh
);
/* eat line */
fgets
(
buf
,
sizeof
buf
,
fh
);
if
(
fgets
(
buf
,
sizeof
buf
,
fh
))
/* eat line */
;
if
(
fgets
(
buf
,
sizeof
buf
,
fh
))
/* eat line */
;
#if 0 /* pretty, but can't cope with missing fields */
fmt = proc_gen_fmt(_PATH_PROCNET_DEV, 1, fh,
...
...
lib/ipx_gr.c
View file @
ca46fb15
...
...
@@ -62,7 +62,8 @@ int IPX_rprint(int options)
printf
(
_
(
"Kernel IPX routing table
\n
"
));
/* xxx */
printf
(
_
(
"Destination Router Net Router Node
\n
"
));
fgets
(
buff
,
1023
,
fp
);
if
(
fgets
(
buff
,
1023
,
fp
))
/* eat line */
;
while
(
fgets
(
buff
,
1023
,
fp
))
{
num
=
sscanf
(
buff
,
"%s %s %s"
,
net
,
router_net
,
router_node
);
...
...
lib/netrom_gr.c
View file @
ca46fb15
...
...
@@ -50,7 +50,8 @@ int NETROM_rprint(int options)
}
printf
(
_
(
"Kernel NET/ROM routing table
\n
"
));
printf
(
_
(
"Destination Mnemonic Quality Neighbour Iface
\n
"
));
fgets
(
buffer
,
256
,
f1
);
if
(
fgets
(
buffer
,
256
,
f1
))
/* eat line */
;
while
(
fgets
(
buffer
,
256
,
f1
))
{
buffer
[
9
]
=
0
;
buffer
[
17
]
=
0
;
...
...
@@ -60,7 +61,8 @@ int NETROM_rprint(int options)
qual
=
atoi
(
buffer
+
24
+
15
*
w
);
n
=
atoi
(
buffer
+
32
+
15
*
w
);
rewind
(
f2
);
fgets
(
buffer
,
256
,
f2
);
if
(
fgets
(
buffer
,
256
,
f2
))
/* eat line */
;
while
(
fgets
(
buffer
,
256
,
f2
))
{
if
(
atoi
(
buffer
)
==
n
)
{
buffer
[
15
]
=
0
;
...
...
lib/rose_gr.c
View file @
ca46fb15
...
...
@@ -53,7 +53,8 @@ int ROSE_rprint(int options)
}
printf
(
_
(
"Kernel ROSE routing table
\n
"
));
printf
(
_
(
"Destination Iface Use
\n
"
));
fgets
(
buffer
,
256
,
f
);
if
(
fgets
(
buffer
,
256
,
f
))
/* eat line */
;
while
(
fgets
(
buffer
,
256
,
f
))
{
buffer
[
9
]
=
0
;
buffer
[
14
]
=
0
;
...
...
lib/x25_gr.c
View file @
ca46fb15
...
...
@@ -62,7 +62,8 @@ int X25_rprint(int options)
}
printf
(
_
(
"Kernel X.25 routing table
\n
"
));
/* xxx */
printf
(
_
(
"Destination Iface
\n
"
));
/* xxx */
fgets
(
buffer
,
256
,
f
);
if
(
fgets
(
buffer
,
256
,
f
))
/* eat line */
;
while
(
fgets
(
buffer
,
256
,
f
))
{
p
=
strchr
(
buffer
,
'\n'
);
...
...
netstat.c
View file @
ca46fb15
...
...
@@ -478,7 +478,8 @@ static int netrom_info(void)
}
printf
(
_
(
"Active NET/ROM sockets
\n
"
));
printf
(
_
(
"User Dest Source Device State Vr/Vs Send-Q Recv-Q
\n
"
));
fgets
(
buffer
,
256
,
f
);
if
(
fgets
(
buffer
,
256
,
f
))
/* eat line */
;
while
(
fgets
(
buffer
,
256
,
f
))
{
buffer
[
9
]
=
0
;
...
...
@@ -686,7 +687,8 @@ static int x25_info(void)
printf
(
_
(
"Active X.25 sockets
\n
"
));
/* IMHO, Vr/Vs is not very usefull --SF */
printf
(
_
(
"Dest Source Device LCI State Vr/Vs Send-Q Recv-Q
\n
"
));
fgets
(
buffer
,
256
,
f
);
if
(
fgets
(
buffer
,
256
,
f
))
/* eat line */
;
while
(
fgets
(
buffer
,
256
,
f
))
{
buffer
[
10
]
=
0
;
...
...
@@ -1541,7 +1543,8 @@ static int ipx_info(void)
EINTERN
(
"netstat.c"
,
"AF_IPX missing"
);
return
(
-
1
);
}
fgets
(
buf
,
255
,
f
);
if
(
fgets
(
buf
,
255
,
f
))
/* eat line */
;
while
(
fgets
(
buf
,
255
,
f
)
!=
NULL
)
{
sscanf
(
buf
,
"%s %s %lX %lX %d %d"
,
...
...
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