diff options
author | Jiri Popelka <jpopelka@redhat.com> | 2012-01-23 14:05:12 +0100 |
---|---|---|
committer | Jiri Popelka <jpopelka@redhat.com> | 2012-01-27 09:49:08 +0100 |
commit | b8cd80d929171d494d248a8c8e05175cb3338784 (patch) | |
tree | 4d3d181a3f14b484d1e18b883e742a282680f8fa | |
parent | a1de64793a9420bddf4dff308a244c5d2cb52d1b (diff) | |
download | net-tools-b8cd80d929171d494d248a8c8e05175cb3338784.tar.gz net-tools-b8cd80d929171d494d248a8c8e05175cb3338784.tar.bz2 net-tools-b8cd80d929171d494d248a8c8e05175cb3338784.zip |
Fixed 2 SELinux related compiler warnings.
-rw-r--r-- | netstat.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -91,8 +91,6 @@ #if HAVE_SELINUX #include <selinux/selinux.h> -#else -#define security_context_t char* #endif #include "net-support.h" #include "pathnames.h" @@ -300,7 +298,7 @@ static void prg_cache_add(unsigned long inode, char *name, const char *scon) strcpy(pn->name, name); { - size_t len = (strlen(scon) - sizeof(pn->scon)) + 1; + int len = (strlen(scon) - sizeof(pn->scon)) + 1; if (len > 0) strcpy(pn->scon, &scon[len + 1]); else @@ -408,7 +406,9 @@ static void prg_cache_load(void) const char *cs, *cmdlp; DIR *dirproc = NULL, *dirfd = NULL; struct dirent *direproc, *direfd; +#if HAVE_SELINUX security_context_t scon = NULL; +#endif if (prg_cache_loaded || !flag_prg) return; prg_cache_loaded = 1; |