Fixed return values of several functions (e.g. return FALSE for pointer types).
This commit is contained in:
parent
060b508e0e
commit
79d5c4f06b
|
@ -65,7 +65,7 @@ int main(int argc, char *argv[])
|
|||
chunk_create(iv, aead->get_iv_size(aead)), NULL))
|
||||
{
|
||||
fprintf(stderr, "aead integrity check failed!\n");
|
||||
return FALSE;
|
||||
return 1;
|
||||
}
|
||||
if (limit && ++i == limit)
|
||||
{
|
||||
|
|
|
@ -398,7 +398,7 @@ agent_private_key_t *agent_private_key_open(key_type_t type, va_list args)
|
|||
}
|
||||
if (!path)
|
||||
{
|
||||
return FALSE;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
INIT(this,
|
||||
|
|
|
@ -152,7 +152,7 @@ static private_key_t *parse_private_key(chunk_t blob)
|
|||
}
|
||||
if (!pgp_read_scalar(&packet, 1, &version))
|
||||
{
|
||||
return FALSE;
|
||||
return NULL;
|
||||
}
|
||||
switch (version)
|
||||
{
|
||||
|
@ -166,7 +166,7 @@ static private_key_t *parse_private_key(chunk_t blob)
|
|||
break;
|
||||
default:
|
||||
DBG1(DBG_LIB, "PGP packet version V%d not supported", version);
|
||||
return FALSE;
|
||||
return NULL;
|
||||
}
|
||||
if (!pgp_read_scalar(&packet, 4, &created))
|
||||
{
|
||||
|
|
|
@ -441,14 +441,14 @@ pgp_cert_t *pgp_cert_load(certificate_type_t type, va_list args)
|
|||
if (!parse_signature(this, packet))
|
||||
{
|
||||
destroy(this);
|
||||
return FALSE;
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case PGP_PKT_USER_ID:
|
||||
if (!parse_user_id(this, packet))
|
||||
{
|
||||
destroy(this);
|
||||
return FALSE;
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -531,7 +531,7 @@ METHOD(plugin_loader_t, load_plugins, bool,
|
|||
if (snprintf(file, sizeof(file), "%s/libstrongswan-%s.so",
|
||||
path, token) >= sizeof(file))
|
||||
{
|
||||
return NULL;
|
||||
return FALSE;
|
||||
}
|
||||
if (!load_plugin(this, token, file) && critical)
|
||||
{
|
||||
|
|
|
@ -1492,7 +1492,7 @@ end:
|
|||
if (hasher == NULL)
|
||||
{
|
||||
DBG1(DBG_ASN, " unable to create hash of certificate, SHA1 not supported");
|
||||
return NULL;
|
||||
return FALSE;
|
||||
}
|
||||
hasher->allocate_hash(hasher, this->encoding, &this->encoding_hash);
|
||||
hasher->destroy(hasher);
|
||||
|
|
|
@ -173,7 +173,7 @@ static int custom_fmt_cb(Vstr_base *base, size_t pos, Vstr_fmt_spec *fmt_spec)
|
|||
{
|
||||
vstr_add_buf(base, pos, buf, written);
|
||||
}
|
||||
return TRUE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue