changeset: 6860:fa32396b5e26 user: Kevin McCarthy <ke...@8t8.us> date: Thu Nov 17 17:54:35 2016 -0800 link: http://dev.mutt.org/hg/mutt/rev/fa32396b5e26
Revert changes made to mutt_find_cfg() in 3c6d322912e3 The usage of MUTT_VERSION in mutt_find_cfg() was fine before the commit: it wasn't using MUTT_VERSION inlined into a string with format string substitution. Revert to the version of mutt_find_cfg() before that changeset. diffs (35 lines): diff -r 022b604bc46d -r fa32396b5e26 init.c --- a/init.c Thu Nov 17 15:57:42 2016 -0800 +++ b/init.c Thu Nov 17 17:54:35 2016 -0800 @@ -2901,11 +2901,11 @@ static char* mutt_find_cfg (const char *home, const char *xdg_cfg_home) { - const char* names[][2] = + const char* names[] = { - { "muttrc", "-" MUTT_VERSION }, - { "muttrc", "" }, - { NULL, NULL }, + "muttrc-" MUTT_VERSION, + "muttrc", + NULL, }; const char* locations[][2] = @@ -2925,12 +2925,12 @@ if (!locations[i][0]) continue; - for (j = 0; names[j][0]; j++) + for (j = 0; names[j]; j++) { char buffer[STRING]; - snprintf (buffer, sizeof (buffer), "%s/%s%s%s", - locations[i][0], locations[i][1], names[j][0], names[j][1]); + snprintf (buffer, sizeof (buffer), + "%s/%s%s", locations[i][0], locations[i][1], names[j]); if (access (buffer, F_OK) == 0) return safe_strdup(buffer); }