diff options
author | Ondrej Kos <okos@redhat.com> | 2013-06-07 14:20:29 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-06-10 11:35:18 +0200 |
commit | 55d1a4662d65b478b4bd398a4abfb7f102d52f0b (patch) | |
tree | f5e3199108366d512965dbd1beedf98007f3c3bd /src/util/nscd.c | |
parent | 265ce7e9fcd9aeaaac1a36c4446072f57f3bd0c2 (diff) | |
download | sssd-55d1a4662d65b478b4bd398a4abfb7f102d52f0b.tar.gz sssd-55d1a4662d65b478b4bd398a4abfb7f102d52f0b.tar.xz sssd-55d1a4662d65b478b4bd398a4abfb7f102d52f0b.zip |
Don't test for NULL in nscd config check
https://fedorahosted.org/sssd/ticket/1971
Coverity IDs: 11851, 11852, 11853
The NULL check on "entry" "service" and "enable" line string parts is
not necessary and triggers warnings in coverity scans.
Diffstat (limited to 'src/util/nscd.c')
-rw-r--r-- | src/util/nscd.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/util/nscd.c b/src/util/nscd.c index 2a06394d3..6c9cc7761 100644 --- a/src/util/nscd.c +++ b/src/util/nscd.c @@ -147,10 +147,6 @@ errno_t sss_nscd_parse_conf(const char *conf_path) while (getline(&line, &linelen, fp) != -1) { - entry = NULL; - service = NULL; - enabled = NULL; - pad = strchr(line, '#'); if (pad != NULL) { *pad = '\0'; @@ -191,15 +187,10 @@ errno_t sss_nscd_parse_conf(const char *conf_path) } *pad = '\0'; - if (entry != NULL && - service != NULL && - enabled != NULL) { - - if (!strcmp(entry, "enable-cache") && - !strcmp(enabled, "yes")) { + if (!strcmp(entry, "enable-cache") && + !strcmp(enabled, "yes")) { - occured |= sss_nscd_check_service(service); - } + occured |= sss_nscd_check_service(service); } }; |