X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=libcitadel%2Flib%2Fhash.c;h=21076b22e3426e3e3b7e71c2b0a8f225924680ef;hb=76c0720efccba7b7dd73fcedec39386f7c0c4b54;hp=e3be284023c196ddce920a4966c49adef566a9e4;hpb=48e5a330a234d93a65e67db781a2c868ec2fe175;p=citadel.git diff --git a/libcitadel/lib/hash.c b/libcitadel/lib/hash.c index e3be28402..21076b22e 100644 --- a/libcitadel/lib/hash.c +++ b/libcitadel/lib/hash.c @@ -622,7 +622,6 @@ void DeleteHashPos(HashPos **DelMe) int GetNextHashPos(HashList *Hash, HashPos *At, long *HKLen, const char **HashKey, void **Data) { long PayloadPos; - long offset = 0; if ((Hash == NULL) || (At->Position >= Hash->nMembersUsed) || @@ -633,9 +632,8 @@ int GetNextHashPos(HashList *Hash, HashPos *At, long *HKLen, const char **HashKe *HashKey = Hash->LookupTable[At->Position]->HashKey; PayloadPos = Hash->LookupTable[At->Position]->Position; *Data = Hash->Members[PayloadPos]->Data; + /* Position is NULL-Based, while Stepwidth is not... */ - if (At->StepWidth < 0) - offset = 1; if ((At->Position % abs(At->StepWidth)) == 0) At->Position += At->StepWidth; else