From a2ba2b6ce0b1f924546619eb99ab60f758c07837 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 8 Sep 2009 14:11:59 +0300 Subject: [PATCH] Initialize diff on declaration where it fits comfortably on one line --- lib/header.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/header.c b/lib/header.c index 74cee50..d233c34 100644 --- a/lib/header.c +++ b/lib/header.c @@ -401,8 +401,7 @@ static int regionSwab(indexEntry entry, int il, int dl, /* Alignment */ type = ie.info.type; if (typeSizes[type] > 1) { - unsigned diff; - diff = typeSizes[type] - (dl % typeSizes[type]); + unsigned diff = typeSizes[type] - (dl % typeSizes[type]); if (diff != typeSizes[type]) { dl += diff; if (ieprev.info.type == RPM_I18NSTRING_TYPE) @@ -497,8 +496,7 @@ static void * doHeaderUnload(Header h, /* Alignment */ type = entry->info.type; if (typeSizes[type] > 1) { - unsigned diff; - diff = typeSizes[type] - (dl % typeSizes[type]); + unsigned diff = typeSizes[type] - (dl % typeSizes[type]); if (diff != typeSizes[type]) { drlen += diff; pad += diff; @@ -523,8 +521,7 @@ static void * doHeaderUnload(Header h, /* Alignment */ type = entry->info.type; if (typeSizes[type] > 1) { - unsigned diff; - diff = typeSizes[type] - (dl % typeSizes[type]); + unsigned diff = typeSizes[type] - (dl % typeSizes[type]); if (diff != typeSizes[type]) { driplen += diff; pad += diff; -- 2.7.4