From: Simon Ruderich Date: Mon, 10 Jun 2019 20:56:17 +0000 (+0200) Subject: nss: gr/pw: make data const X-Git-Tag: 0.1~72 X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=c6363eab83ca507ee1a566b5b98eefad61fbe8b3;p=nsscash%2Fnsscash.git nss: gr/pw: make data const We cannot modify it anyway. --- 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) {