diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-04-16 14:45:45 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-04-16 14:45:45 +0200 |
commit | f3a411783c9736645d6ba480c5ff9d861164c040 (patch) | |
tree | d2f67aec69b8953840815b25946361cca9cb8269 /src/structs.h | |
parent | 498c2562e1bcc72492fe8da8a76504f893e9b5fe (diff) | |
download | vim-git-f3a411783c9736645d6ba480c5ff9d861164c040.tar.gz |
patch 8.0.1723: using one item array size declaration is misleadingv8.0.1723
Problem: Using one item array size declaration is misleading.
Solution: Instead of using "[1]" and actually using a larger array, use
"[]". This is to verify that this C99 feature works for all
compilers.
Diffstat (limited to 'src/structs.h')
-rw-r--r-- | src/structs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/structs.h b/src/structs.h index d3f98ac12..92025274e 100644 --- a/src/structs.h +++ b/src/structs.h @@ -511,7 +511,7 @@ typedef struct buffheader buffheader_T; struct buffblock { buffblock_T *b_next; /* pointer to next buffblock */ - char_u b_str[1]; /* contents (actually longer) */ + char_u b_str[]; /* contents (flexible array) */ }; /* @@ -519,7 +519,7 @@ struct buffblock */ struct buffheader { - buffblock_T bh_first; /* first (dummy) block of list */ + buffblock_T *bh_first; /* first block of the list */ buffblock_T *bh_curr; /* buffblock for appending */ int bh_index; /* index for reading */ int bh_space; /* space in bh_curr for appending */ |