X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeshlink_queue.h;h=a713f93f24a0b2b36ed66dea5ad48f4653dce371;hb=e25370c54e78fda0a7996b008f7ad68aa80f2ccd;hp=c86bf660ed22af5c4ea262932cf4e0a3de640ab0;hpb=196806f90f40fcc0cf727abd4bed6bc5aefff5ff;p=meshlink diff --git a/src/meshlink_queue.h b/src/meshlink_queue.h index c86bf660..a713f93f 100644 --- a/src/meshlink_queue.h +++ b/src/meshlink_queue.h @@ -1,6 +1,9 @@ +#ifndef MESHLINK_QUEUE_H +#define MESHLINK_QUEUE_H + /* queue.h -- Thread-safe queue - Copyright (C) 2014 Guus Sliepen + Copyright (C) 2014, 2017 Guus Sliepen 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 #include #include @@ -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;