[SSSD] [PATCH] [DHASH] Remove dead code

Lukas Slebodnik lslebodn at redhat.com
Thu Jan 9 18:23:56 UTC 2014


ehlo,

simple patch is attached.

LS
-------------- next part --------------
>From c683a4369e9492ff362071118258d60618da83dc Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Thu, 9 Jan 2014 19:18:34 +0100
Subject: [PATCH] DHASH: Remove dead code.

HI_STATE_0 cannot be reached in switch, because there is no falltrough
from another case and there is check few lines before in while
    "(state != HI_STATE_0)"
---
 dhash/dhash.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/dhash/dhash.c b/dhash/dhash.c
index d73b7e573dd64d89c89c0a899d2a51a75cb1a795..a9b4f647c638484a981adb8efd4da9020785d7c6 100644
--- a/dhash/dhash.c
+++ b/dhash/dhash.c
@@ -724,8 +724,6 @@ static hash_entry_t *hash_iter_next(struct hash_iter_context_t *iter_arg)
     while (state != HI_STATE_0) {
 
         switch (state) {
-            case HI_STATE_0:
-                break;
             case HI_STATE_1:
                 iter->i++;
                 if(iter->i >= iter->table->segment_count) return NULL;
-- 
1.8.4.2



More information about the sssd-devel mailing list