libpriv: Reduce scope of variables

nchange_date, nchange_name, and nchange_text are declared in a larger
scope in rpmostree-rpm-util.c. Reduce the scope to satisfy cppcheck.

Closes: #628
Approved by: jlebon
This commit is contained in:
Eduardo Mayorga 2017-02-15 17:48:25 -06:00 committed by Atomic Bot
parent 12448b9e33
commit 1f2170e10c

View File

@ -508,9 +508,6 @@ rpmhdrs_diff_prnt_block (gboolean changelogs, struct RpmHeadersDiff *diff)
uint64_t ochange_date = 0;
const char *ochange_name = NULL;
const char *ochange_text = NULL;
uint64_t nchange_date = 0;
const char *nchange_name = NULL;
const char *nchange_text = NULL;
g_assert (!header_name_cmp (ho, hn));
if (rpmVersionCompare (ho, hn) > 0)
@ -559,6 +556,9 @@ rpmhdrs_diff_prnt_block (gboolean changelogs, struct RpmHeadersDiff *diff)
while (ncnum > 0)
{
uint64_t nchange_date = 0;
const char *nchange_name = NULL;
const char *nchange_text = NULL;
GDateTime *dt = NULL;
g_autofree char *date_time_str = NULL;