commit: 2f5a42a9d667ac3625be33ae90faf650d4f51912 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Sun May 17 08:14:00 2020 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Sun May 17 08:14:00 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=2f5a42a9
main: replace another instance of strlen with sizoef() - 1 As pointed out by Guillermo D. H. there was another instance of strlen used on a constant. Bug: https://bugs.gentoo.org/723422 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index aa7eae2..d2a452c 100644 --- a/main.c +++ b/main.c @@ -594,7 +594,7 @@ env_vars vars_to_read[] = { #define _Q_EV(t, V, set, lset, d) \ { \ .name = #V, \ - .name_len = strlen(#V), \ + .name_len = sizeof(#V) - 1, \ .type = _Q_##t, \ set, \ lset, \ @@ -626,6 +626,8 @@ env_vars vars_to_read[] = { { NULL, 0, _Q_BOOL, { NULL }, 0, NULL, NULL, } #undef _Q_EV +#undef _Q_EVS +#undef _Q_EVB }; set *package_masks = NULL;