aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer_defs.h
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-16 18:58:07 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-19 01:36:00 -0400
commit315076a26d225a3bdc34a2cbba1f124adf4e1087 (patch)
treea0d35ebd062972d9197f2a645ddeec330ed0f073 /src/nvim/buffer_defs.h
parent352d5a971344e2402aaa8704b802fa7dfaaa3050 (diff)
downloadrneovim-315076a26d225a3bdc34a2cbba1f124adf4e1087.tar.gz
rneovim-315076a26d225a3bdc34a2cbba1f124adf4e1087.tar.bz2
rneovim-315076a26d225a3bdc34a2cbba1f124adf4e1087.zip
vim-patch:8.0.1723: using one item array size declaration is misleading
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. https://github.com/vim/vim/commit/f3a411783c9736645d6ba480c5ff9d861164c040 The following patch is N/A because Neovim requires C99. vim-patch:8.0.1735: flexible array member feature not supported by HP-UX
Diffstat (limited to 'src/nvim/buffer_defs.h')
-rw-r--r--src/nvim/buffer_defs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h
index 69cefe2247..4b0e680c25 100644
--- a/src/nvim/buffer_defs.h
+++ b/src/nvim/buffer_defs.h
@@ -133,14 +133,14 @@ 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)
};
/*
* header used for the stuff buffer and the redo buffer
*/
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
size_t bh_index; // index for reading
size_t bh_space; // space in bh_curr for appending