Skip to content

Commit 7637356

Browse files
lib/list.c: del_list(): Use memmove_T() instead of its pattern
This adds type safety. Signed-off-by: Alejandro Colomar <[email protected]>
1 parent acfbbd9 commit 7637356

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/list.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "defines.h"
2020
#include "string/strchr/strchrcnt.h"
2121
#include "string/strcmp/streq.h"
22+
#include "string/strcpy/memmove.h"
2223
#include "string/strdup/strdup.h"
2324
#include "string/strtok/strsep2ls.h"
2425

@@ -67,7 +68,7 @@ del_list(/*@returned@*/ /*@only@*/char **list, const char *member)
6768
continue;
6869
for (m = 0; list[m] != NULL && !streq(list[m], member); m++)
6970
continue;
70-
memmove(&list[m], &list[m+1], (n-m) * sizeof(char *));
71+
memmove_T(&list[m], &list[m+1], n-m, char *);
7172
} while (m != n);
7273

7374
return xrealloc_T(list, n+1, char *);

0 commit comments

Comments
 (0)