From: Art Cancro Date: Thu, 10 Sep 2009 19:29:56 +0000 (+0000) Subject: * Removed the 'w' variable because it was always set to the same value X-Git-Tag: v7.86~862 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=dd5f80682a01362b550f9eb0b2f64c69519d642c;p=citadel.git * Removed the 'w' variable because it was always set to the same value --- diff --git a/citadel/msgbase.c b/citadel/msgbase.c index b19a07924..68a0c4114 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -353,7 +353,6 @@ void CtdlSetSeen(long *target_msgnums, int num_target_msgnums, StrBuf *histr; const char *pvset; char *is_set; /* actually an array of booleans */ - int w = 0; /* Don't bother doing *anything* if we were passed a list of zero messages */ if (num_target_msgnums < 1) { @@ -469,14 +468,11 @@ void CtdlSetSeen(long *target_msgnums, int num_target_msgnums, } } - w = 0; /* set to 1 if we write something to the string */ - if ((was_seen == 0) && (is_seen == 1)) { lo = msglist[i]; } else if ((was_seen == 1) && (is_seen == 0)) { hi = msglist[i-1]; - w = 1; if (StrLength(vset) > 0) { StrBufAppendBufPlain(vset, HKEY(","), 0); @@ -489,7 +485,6 @@ void CtdlSetSeen(long *target_msgnums, int num_target_msgnums, } } else if ((is_seen) && (i == num_msgs - 1)) { - w = 1; if (StrLength(vset) > 0) { StrBufAppendBufPlain(vset, HKEY(","), 0); } @@ -513,7 +508,6 @@ void CtdlSetSeen(long *target_msgnums, int num_target_msgnums, int number_of_truncations = 0; while ( (StrLength(vset) > SIZ) && (number_of_truncations < 100) ) { StrBufRemove_token(vset, 0, ','); - w = 1; ++number_of_truncations; } @@ -558,9 +552,7 @@ void CtdlSetSeen(long *target_msgnums, int num_target_msgnums, free(is_set); free(msglist); - if (w) { - CtdlSetRelationship(&vbuf, which_user, which_room); - } + CtdlSetRelationship(&vbuf, which_user, which_room); FreeStrBuf(&vset); }