From c6363eab83ca507ee1a566b5b98eefad61fbe8b3 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 10 Jun 2019 22:56:17 +0200 Subject: [PATCH] nss: gr/pw: make data const We cannot modify it anyway. --- nss/gr.c | 2 +- nss/pw.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nss/gr.c b/nss/gr.c index fbfd02f..8b336f9 100644 --- a/nss/gr.c +++ b/nss/gr.c @@ -52,7 +52,7 @@ struct group_entry { * All offsets are relative to the beginning of data. */ uint16_t data_size; - char data[]; + const char data[]; } __attribute__((packed)); static bool entry_to_group(const struct group_entry *e, struct group *g, char *tmp, size_t space) { diff --git a/nss/pw.c b/nss/pw.c index e4f99aa..4313ee3 100644 --- a/nss/pw.c +++ b/nss/pw.c @@ -48,7 +48,7 @@ struct passwd_entry { * concatenated, with their trailing NUL. The off_* variables point to * beginning of each string. */ - char data[]; + const char data[]; } __attribute__((packed)); static bool entry_to_passwd(const struct passwd_entry *e, struct passwd *p, char *tmp, size_t space) { -- 2.43.2