Skip to content

Commit

Permalink
-Wstrict-bool warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Aug 11, 2016
1 parent 1156613 commit b544772
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/doveadm/doveadm-auth-server.c
Expand Up @@ -91,7 +91,7 @@ cmd_user_input(struct auth_master_connection *conn,
string_t *json_field = t_str_new(show_field_len+1);
json_append_escaped(json_field, show_field);
o_stream_nsend_str(doveadm_print_ostream, t_strdup_printf("\"%s\":", str_c(json_field)));
for (; *fields; fields++) {
for (; *fields != NULL; fields++) {
if (strncmp(*fields, show_field, show_field_len) == 0 &&
(*fields)[show_field_len] == '=') {
string_t *jsonval = t_str_new(32);
Expand All @@ -113,7 +113,7 @@ cmd_user_input(struct auth_master_connection *conn,
o_stream_nsend_str(doveadm_print_ostream, str_c(jsonval));
o_stream_nsend_str(doveadm_print_ostream, "\"");
}
for (; *fields; fields++) {
for (; *fields != NULL; fields++) {
const char *field = *fields;
if (*field == '\0') continue;
p = strchr(*fields, '=');
Expand Down
2 changes: 1 addition & 1 deletion src/doveadm/doveadm-dump-dcrypt-file.c
Expand Up @@ -41,7 +41,7 @@ static void dcrypt_istream_dump_metadata(const struct istream *stream)
}
}

static int dcrypt_file_dump_metadata(const char *filename, bool print)
static bool dcrypt_file_dump_metadata(const char *filename, bool print)
{
bool ret = FALSE;
struct istream *is = i_stream_create_file(filename, IO_BLOCK_SIZE);
Expand Down
2 changes: 1 addition & 1 deletion src/lib-ssl-iostream/iostream-openssl-context.c
Expand Up @@ -157,7 +157,7 @@ ssl_iostream_ctx_use_dh(struct ssl_iostream_context *ctx,

if (openssl_iostream_load_dh(set, &dh, error_r) < 0)
return -1;
if (!SSL_CTX_set_tmp_dh(ctx->ssl_ctx, dh)) {
if (SSL_CTX_set_tmp_dh(ctx->ssl_ctx, dh) == 0) {
*error_r = t_strdup_printf(
"Can't load DH parameters: %s",
openssl_iostream_key_load_error());
Expand Down

0 comments on commit b544772

Please sign in to comment.