diff options
author | Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com> | 2022-10-11 22:23:14 +0200 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2022-11-08 19:58:47 +0100 |
commit | d96d0f9617793b6cd95b9b9a8fef66f69f8f6b1b (patch) | |
tree | fbde3950c659be700017a5e9a515c29c10a79c5a /fs/dlm/dlm_internal.h | |
parent | Linux 6.1-rc4 (diff) | |
download | linux-d96d0f9617793b6cd95b9b9a8fef66f69f8f6b1b.tar.xz linux-d96d0f9617793b6cd95b9b9a8fef66f69f8f6b1b.zip |
dlm: replace one-element array with fixed size array
One-element arrays are deprecated. So, replace one-element array with
fixed size array member in struct dlm_ls, and refactor the rest of the
code, accordingly.
Link: https://github.com/KSPP/linux/issues/79
Link: https://github.com/KSPP/linux/issues/228
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836
Link: https://lore.kernel.org/lkml/Y0W5jkiXUkpNl4ap@mail.google.com/
Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/dlm_internal.h')
-rw-r--r-- | fs/dlm/dlm_internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h index e34c3d2639a5..94fadb619ba0 100644 --- a/fs/dlm/dlm_internal.h +++ b/fs/dlm/dlm_internal.h @@ -670,7 +670,7 @@ struct dlm_ls { void *ls_ops_arg; int ls_namelen; - char ls_name[1]; + char ls_name[DLM_LOCKSPACE_LEN + 1]; }; /* |