Hi,

* Use sizeof() instead of hardcoding the size.

Tested against the regression tests for pqueue.

ok?

===================================================================
--- pqueue.orig/pqueue.c
+++ pqueue/pqueue.c
@@ -160,7 +160,8 @@ pqueue_find(pqueue_s *pq, unsigned char
        pitem *next;
 
        for (next = pq->items; next != NULL; next = next->next)
-               if (memcmp(next->priority, prio64be, 8) == 0)
+               if (memcmp(next->priority, prio64be,
+                          sizeof(next->priority)) == 0)
                        return next;
        return NULL;
 }

Reply via email to