libsepol: fix unused variable 'len' on mac build

Fix this:
genusers.c:39:9: warning: unused variable 'len' [-Wunused-variable]
        size_t len = 0;

Signed-off-by: William Roberts <william.c.roberts@intel.com>
This commit is contained in:
William Roberts 2016-09-23 13:55:51 -07:00 committed by Stephen Smalley
parent e729fbe9b4
commit 87c5afdad2

View file

@ -36,7 +36,6 @@ static int load_users(struct policydb *policydb, const char *path)
{ {
FILE *fp; FILE *fp;
char *buffer = NULL, *p, *q, oldc; char *buffer = NULL, *p, *q, oldc;
size_t len = 0;
ssize_t nread; ssize_t nread;
unsigned lineno = 0, islist = 0, bit; unsigned lineno = 0, islist = 0, bit;
user_datum_t *usrdatum; user_datum_t *usrdatum;
@ -55,6 +54,7 @@ static int load_users(struct policydb *policydb, const char *path)
while(fgets(buffer, 255, fp) != NULL) { while(fgets(buffer, 255, fp) != NULL) {
#else #else
size_t len = 0;
__fsetlocking(fp, FSETLOCKING_BYCALLER); __fsetlocking(fp, FSETLOCKING_BYCALLER);
while ((nread = getline(&buffer, &len, fp)) > 0) { while ((nread = getline(&buffer, &len, fp)) > 0) {
#endif #endif