]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink_queue.h
Automatically configure and compile catta.
[meshlink] / src / meshlink_queue.h
index c86bf660ed22af5c4ea262932cf4e0a3de640ab0..a713f93f24a0b2b36ed66dea5ad48f4653dce371 100644 (file)
@@ -1,6 +1,9 @@
+#ifndef MESHLINK_QUEUE_H
+#define MESHLINK_QUEUE_H
+
 /*
     queue.h -- Thread-safe queue
-    Copyright (C) 2014 Guus Sliepen <guus@meshlink.io>
+    Copyright (C) 2014, 2017 Guus Sliepen <guus@meshlink.io>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -17,9 +20,6 @@
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#ifndef MESHLINK_QUEUE_H
-#define MESHLINK_QUEUE_H
-
 #include <pthread.h>
 #include <stdbool.h>
 #include <stddef.h>
@@ -37,7 +37,7 @@ typedef struct meshlink_queue_item {
 } meshlink_queue_item_t;
 
 static inline bool meshlink_queue_push(meshlink_queue_t *queue, void *data) {
-       meshlink_queue_item_t *item = malloc(sizeof *item);
+       meshlink_queue_item_t *item = malloc(sizeof(*item));
        if(!item)
                return false;
        item->data = data;