Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/handle.c')
-rw-r--r--lib/libalpm/handle.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index be5666dc..f912d2f5 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -803,10 +803,13 @@ int SYMEXPORT alpm_option_set_default_siglevel(alpm_handle_t *handle,
int level)
{
CHECK_HANDLE(handle, return -1);
+ if(level == ALPM_SIG_USE_DEFAULT) {
+ RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1);
+ }
#ifdef HAVE_LIBGPGME
handle->siglevel = level;
#else
- if(level != 0 && level != ALPM_SIG_USE_DEFAULT) {
+ if(level != 0) {
RET_ERR(handle, ALPM_ERR_MISSING_CAPABILITY_SIGNATURES, -1);
}
#endif