[Forensics-changes] [yara] 176/368: Use existing error code for return vals
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:30:26 UTC 2017
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag v3.5.0
in repository yara.
commit 55cd683de0d4ae60bef8500827480773b00295af
Author: Coleman Kane <ckane at colemankane.org>
Date: Fri Feb 19 21:31:52 2016 -0500
Use existing error code for return vals
---
libyara/libyara.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/libyara/libyara.c b/libyara/libyara.c
index bb36699..f6a0277 100644
--- a/libyara/libyara.c
+++ b/libyara/libyara.c
@@ -228,30 +228,30 @@ YR_API int yr_get_tidx(void)
YR_API int yr_set_configuration(enum yr_cfg_name cfgname, void *src) {
if(src == NULL) {
- return 1;
+ return ERROR_INTERNAL_FATAL_ERROR;
}
switch(cfgname) { // lump all the cases using same types together in one cascade
case YR_CONFIG_STACK_SIZE:
yr_cfgs[cfgname].data.ui = *(unsigned int*)src;
break;
default:
- return 1;
+ return ERROR_INTERNAL_FATAL_ERROR;
}
- return 0;
+ return ERROR_SUCCESS;
}
YR_API int yr_get_configuration(enum yr_cfg_name cfgname, void *dest) {
if(dest == NULL) {
- return 1;
+ return ERROR_INTERNAL_FATAL_ERROR;
}
switch(cfgname) { // lump all the cases using same types together in one cascade
case YR_CONFIG_STACK_SIZE:
*(size_t*)dest = yr_cfgs[cfgname].data.ui;
break;
default:
- return 1;
+ return ERROR_INTERNAL_FATAL_ERROR;
}
- return 0;
+ return ERROR_SUCCESS;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git
More information about the forensics-changes
mailing list