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
b8cd80d9
Commit
b8cd80d9
authored
Jan 23, 2012
by
Jiri Popelka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed 2 SELinux related compiler warnings.
parent
a1de6479
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
netstat.c
netstat.c
+3
-3
No files found.
netstat.c
View file @
b8cd80d9
...
@@ -91,8 +91,6 @@
...
@@ -91,8 +91,6 @@
#if HAVE_SELINUX
#if HAVE_SELINUX
#include <selinux/selinux.h>
#include <selinux/selinux.h>
#else
#define security_context_t char*
#endif
#endif
#include "net-support.h"
#include "net-support.h"
#include "pathnames.h"
#include "pathnames.h"
...
@@ -300,7 +298,7 @@ static void prg_cache_add(unsigned long inode, char *name, const char *scon)
...
@@ -300,7 +298,7 @@ static void prg_cache_add(unsigned long inode, char *name, const char *scon)
strcpy
(
pn
->
name
,
name
);
strcpy
(
pn
->
name
,
name
);
{
{
size_
t
len
=
(
strlen
(
scon
)
-
sizeof
(
pn
->
scon
))
+
1
;
in
t
len
=
(
strlen
(
scon
)
-
sizeof
(
pn
->
scon
))
+
1
;
if
(
len
>
0
)
if
(
len
>
0
)
strcpy
(
pn
->
scon
,
&
scon
[
len
+
1
]);
strcpy
(
pn
->
scon
,
&
scon
[
len
+
1
]);
else
else
...
@@ -408,7 +406,9 @@ static void prg_cache_load(void)
...
@@ -408,7 +406,9 @@ static void prg_cache_load(void)
const
char
*
cs
,
*
cmdlp
;
const
char
*
cs
,
*
cmdlp
;
DIR
*
dirproc
=
NULL
,
*
dirfd
=
NULL
;
DIR
*
dirproc
=
NULL
,
*
dirfd
=
NULL
;
struct
dirent
*
direproc
,
*
direfd
;
struct
dirent
*
direproc
,
*
direfd
;
#if HAVE_SELINUX
security_context_t
scon
=
NULL
;
security_context_t
scon
=
NULL
;
#endif
if
(
prg_cache_loaded
||
!
flag_prg
)
return
;
if
(
prg_cache_loaded
||
!
flag_prg
)
return
;
prg_cache_loaded
=
1
;
prg_cache_loaded
=
1
;
...
...
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