libselinux: fix coding style problems with the prior commit

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
This commit is contained in:
Stephen Smalley 2016-09-09 14:25:06 -04:00
parent 5e15a52aaa
commit 0a0e5afbb4

View File

@ -97,11 +97,12 @@ static int nodups_specs(struct saved_data *data, const char *path)
return rc;
}
static int process_text_file(FILE *fp, const char *prefix, struct selabel_handle *rec, const char *path)
static int process_text_file(FILE *fp, const char *prefix,
struct selabel_handle *rec, const char *path)
{
int rc;
size_t line_len;
unsigned lineno = 0;
unsigned int lineno = 0;
char *line_buf = NULL;
while (getline(&line_buf, &line_len, fp) > 0) {
@ -115,7 +116,8 @@ out:
return rc;
}
static int load_mmap(FILE *fp, size_t len, struct selabel_handle *rec, const char *path)
static int load_mmap(FILE *fp, size_t len, struct selabel_handle *rec,
const char *path)
{
struct saved_data *data = (struct saved_data *)rec->data;
int rc;
@ -284,7 +286,8 @@ static int load_mmap(FILE *fp, size_t len, struct selabel_handle *rec, const cha
if (strcmp(spec->lr.ctx_raw, "<<none>>") && rec->validating) {
if (selabel_validate(rec, &spec->lr) < 0) {
selinux_log(SELINUX_ERROR,
"%s: context %s is invalid\n", path, spec->lr.ctx_raw);
"%s: context %s is invalid\n",
path, spec->lr.ctx_raw);
goto out;
}
}
@ -446,7 +449,7 @@ static bool fcontext_is_binary(FILE *fp)
static FILE *open_file(const char *path, const char *suffix,
char *save_path, size_t len, struct stat *sb)
{
unsigned i;
unsigned int i;
int rc;
char stack_path[len];
struct file_details *found = NULL;