aboutsummaryrefslogtreecommitdiff
path: root/lib/diag.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-10-08 08:47:55 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2012-10-08 08:47:55 +0300
commit04f58aaf7a6f27e3b79e8f5ccffeb006db56aeaf (patch)
tree594c445f1486b6fa28cd122129a9a9b851a3d846 /lib/diag.c
parent9c97ac525930863abd56a77db9b3cdcf63c4cdd6 (diff)
downloadeclat-04f58aaf7a6f27e3b79e8f5ccffeb006db56aeaf.tar.gz
eclat-04f58aaf7a6f27e3b79e8f5ccffeb006db56aeaf.tar.bz2
Minor fixes.
* lib/diag.c (parse_debug_level): Allow for category specifications without level (100 is assumed). * lib/ldapmap.c (ldap_map_config): Error checking. (ldap_map_free): Free all allocated memory. (parse_ldap_uri): Cleanup.
Diffstat (limited to 'lib/diag.c')
-rw-r--r--lib/diag.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/diag.c b/lib/diag.c
index d061e9e..5386abd 100644
--- a/lib/diag.c
+++ b/lib/diag.c
@@ -143,12 +143,13 @@ parse_debug_level(const char *arg)
if (arg[len] == 0) {
lev = strtoul(arg, &p, 10);
- if (*p)
- return -1;
- for (dp = debug_category; dp < debug_category + debug_avail;
- dp++)
- dp->level = lev;
- return 0;
+ if (*p == 0) {
+ for (dp = debug_category;
+ dp < debug_category + debug_avail;
+ dp++)
+ dp->level = lev;
+ return 0;
+ }
}
dp = find_category(arg, len);

Return to:

Send suggestions and report system problems to the System administrator.