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:
parent
e729fbe9b4
commit
87c5afdad2
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,6 @@ static int load_users(struct policydb *policydb, const char *path)
|
|||
{
|
||||
FILE *fp;
|
||||
char *buffer = NULL, *p, *q, oldc;
|
||||
size_t len = 0;
|
||||
ssize_t nread;
|
||||
unsigned lineno = 0, islist = 0, bit;
|
||||
user_datum_t *usrdatum;
|
||||
|
@ -55,6 +54,7 @@ static int load_users(struct policydb *policydb, const char *path)
|
|||
|
||||
while(fgets(buffer, 255, fp) != NULL) {
|
||||
#else
|
||||
size_t len = 0;
|
||||
__fsetlocking(fp, FSETLOCKING_BYCALLER);
|
||||
while ((nread = getline(&buffer, &len, fp)) > 0) {
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue