Fix compilation warnings from gcc 4.6.
[srvx.git] / src / log.c
index 4ea72cf54516ec3db300be79423f2ec74d99bb0f..33b0a8b78709fee0763b19eb2dd497955f656964 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -730,12 +730,11 @@ log_entry_search(struct logSearch *discrim, entry_search_func esf, void *data)
     unsigned int matched = 0;
 
     if (discrim->type) {
-        static volatile struct logEntry *last;
         struct logEntry *entry;
 
-        for (entry = discrim->type->log_oldest, last = NULL;
+        for (entry = discrim->type->log_oldest;
              entry;
-             last = entry, entry = entry->next) {
+             entry = entry->next) {
             verify(entry);
             if (entry_match(discrim, entry)) {
                 esf(entry, data);