@@ -45,7 +45,7 @@ static int bzip(semanage_handle_t *sh, const char *filename, void *data,
size_t size = 1<<16;
int bzerror;
size_t total = 0;
- size_t len = 0;
+ size_t len;
FILE *f;
if ((f = fopen(filename, "wb")) == NULL) {
@@ -582,7 +582,7 @@ cleanup:
static int read_from_pipe_to_data(semanage_handle_t *sh, size_t initial_len, int fd, char **out_data_read, size_t *out_read_len)
{
size_t max_len = initial_len;
- ssize_t read_len = 0;
+ ssize_t read_len;
size_t data_read_len = 0;
char *data_read = NULL;
@@ -1001,7 +1001,7 @@ static int semanage_compile_hll_modules(semanage_handle_t *sh,
/* to be incremented when checksum input data format changes */
static const size_t CHECKSUM_EPOCH = 2;
- int i, status = 0;
+ int i, status;
char cil_path[PATH_MAX];
struct stat sb;
Sha256Context context;
@@ -2081,7 +2081,7 @@ int semanage_direct_get_serial(semanage_handle_t * sh)
int semanage_load_files(semanage_handle_t * sh, cil_db_t *cildb, char **filenames, int numfiles)
{
- int i, retval = 0;
+ int i, retval;
char *filename;
struct file_contents contents = {};
@@ -2557,8 +2557,6 @@ int semanage_fc_sort(semanage_handle_t * sh, const char *buf, size_t buf_len,
semanage_file_context_bucket_t *main;
semanage_file_context_bucket_t *bcurrent;
- i = 0;
-
if (sh == NULL) {
return -1;
}
@@ -66,7 +66,7 @@ static int user_base_parse(semanage_handle_t * handle,
parse_info_t * info, semanage_user_base_t * user)
{
- int islist = 0;
+ int islist;
char *str = NULL;
char *start;
char *name_str = NULL;