https://fedorahosted.org/sssd/ticket/1889
From 659b7f178ed49a8a37a7917d561107c9bfc6b88c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrez...@redhat.com>
Date: Mon, 22 Apr 2013 11:04:39 +0200
Subject: [PATCH] sudo client: remove dead code

https://fedorahosted.org/sssd/ticket/1889

Fixes two minor coverity issues.
---
 src/sss_client/sudo/sss_sudo.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/sss_client/sudo/sss_sudo.c b/src/sss_client/sudo/sss_sudo.c
index ec506429b35c05377d818a0d3f90a5b4e95a0f6a..202029934ccb7c979b9b740fc7e466888825e042 100644
--- a/src/sss_client/sudo/sss_sudo.c
+++ b/src/sss_client/sudo/sss_sudo.c
@@ -217,10 +217,6 @@ void sss_sudo_free_rules(unsigned int num_rules, struct sss_sudo_rule *rules)
     for (i = 0; i < num_rules; i++) {
         rule = rules + i;
 
-        if (rule == NULL) {
-            continue;
-        }
-
         sss_sudo_free_attrs(rule->num_attrs, rule->attrs);
         rule->attrs = NULL;
     }
@@ -240,10 +236,6 @@ void sss_sudo_free_attrs(unsigned int num_attrs, struct sss_sudo_attr *attrs)
     for (i = 0; i < num_attrs; i++) {
         attr = attrs + i;
 
-        if (attr == NULL) {
-            continue;
-        }
-
         free(attr->name);
         attr->name = NULL;
 
-- 
1.7.11.7

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to