diff options
author | Marvin Borner | 2021-04-01 19:39:14 +0200 |
---|---|---|
committer | Marvin Borner | 2021-04-01 19:39:14 +0200 |
commit | afa00abb2b68205bee539d7947130d6b1b1ec6e9 (patch) | |
tree | 3a821a75af6c4d4ff1bd4128c4859d77abf87e66 /libs/libc/inc/list.h | |
parent | 4c168fb34c15a1b8981abef7ccef1542a6fb05ca (diff) |
Hardened entire system
By using the nonnull attribute and replace buffer-overflow-prone
functions like strcpy, strcat and sprintf by strlcpy, strlcat and
snprintf.
Diffstat (limited to 'libs/libc/inc/list.h')
-rw-r--r-- | libs/libc/inc/list.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/libc/inc/list.h b/libs/libc/inc/list.h index 0b82b48..fea98dc 100644 --- a/libs/libc/inc/list.h +++ b/libs/libc/inc/list.h @@ -17,13 +17,13 @@ struct node { }; struct list *list_new(void); -void list_destroy(struct list *list); +void list_destroy(struct list *list) NONNULL; /* struct node *list_new_node(); */ // TODO: Make node-specific things static/private? /* void list_add_node(struct list *list, struct node *node); */ -struct node *list_add(struct list *list, void *data); -struct list *list_remove(struct list *list, struct node *node); -struct node *list_last(struct list *list); -struct list *list_swap(struct list *list, struct node *a, struct node *b); -struct node *list_first_data(struct list *list, void *data); +struct node *list_add(struct list *list, void *data) NONNULL; +struct list *list_remove(struct list *list, struct node *node) NONNULL; +struct node *list_last(struct list *list) NONNULL; +struct list *list_swap(struct list *list, struct node *a, struct node *b) NONNULL; +struct node *list_first_data(struct list *list, void *data) NONNULL; #endif |