chiark / gitweb /
Prep v220: Apply "Fixes to user and session saving"
[elogind.git] / src / shared / prioq.c
index 537befc623a1554bd4b57bb115ca223bacddbbb4..b89888be0e8d5460313ffc3e9712856f214ce5d2 100644 (file)
@@ -45,12 +45,14 @@ Prioq *prioq_new(compare_func_t compare_func) {
         return q;
 }
 
-void prioq_free(Prioq *q) {
+Prioq* prioq_free(Prioq *q) {
         if (!q)
-                return;
+                return NULL;
 
         free(q->items);
         free(q);
+
+        return NULL;
 }
 
 int prioq_ensure_allocated(Prioq **q, compare_func_t compare_func) {
@@ -295,8 +297,8 @@ unsigned prioq_size(Prioq *q) {
                 return 0;
 
         return q->n_items;
-
 }
+
 bool prioq_isempty(Prioq *q) {
 
         if (!q)