diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-10-08 08:47:55 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-10-08 08:47:55 +0300 |
commit | 04f58aaf7a6f27e3b79e8f5ccffeb006db56aeaf (patch) | |
tree | 594c445f1486b6fa28cd122129a9a9b851a3d846 /lib/diag.c | |
parent | 9c97ac525930863abd56a77db9b3cdcf63c4cdd6 (diff) | |
download | eclat-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.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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); |