From 5bd75381f4c002b0381adfeb587be735fc11367c Mon Sep 17 00:00:00 2001 From: Igmar Palsenberg Date: Mon, 6 Jun 2011 16:27:16 +0200 Subject: [PATCH 2/6] - Use flexible array member instead of [1]. --- include/dirent.h | 2 +- src/malloc/malloc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/dirent.h b/include/dirent.h index ca000bd..5496be3 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -18,7 +18,7 @@ struct dirent off_t d_off; unsigned short d_reclen; unsigned char d_type; - char d_name[1]; + char d_name[]; }; #define d_fileno d_ino diff --git a/src/malloc/malloc.c b/src/malloc/malloc.c index bc8382e..79db0fa 100644 --- a/src/malloc/malloc.c +++ b/src/malloc/malloc.c @@ -16,9 +16,9 @@ void *__mremap(void *, size_t, size_t, int, ...); int __madvise(void *, size_t, int); struct chunk { - size_t data[1]; struct chunk *next; struct chunk *prev; + size_t data[]; }; struct bin { -- 1.7.5.2