diff -p -up rpm-4.4.2.3/tools/debugedit.c.pix rpm-4.4.2.3/tools/debugedit.c --- rpm-4.4.2.3/tools/debugedit.c.pix 2008-05-27 10:52:48.000000000 +0200 +++ rpm-4.4.2.3/tools/debugedit.c 2008-05-27 11:07:07.000000000 +0200 @@ -1304,6 +1304,13 @@ error_out: return NULL; } +static void process (hashFunctionContext *ctx, const void *data, size_t size) +{ + memchunk chunk = { .data = (void *) data, .size = size }; + hashFunctionContextUpdateMC (ctx, &chunk); +} + + /* Compute a fresh build ID bit-string from the editted file contents. */ static void handle_build_id (DSO *dso, Elf_Data *build_id, @@ -1346,13 +1353,6 @@ handle_build_id (DSO *dso, Elf_Data *bui or Elf64 object, only that we are consistent in what bits feed the hash so it comes out the same for the same file contents. */ { - inline void process (const void *data, size_t size); - inline void process (const void *data, size_t size) - { - memchunk chunk = { .data = (void *) data, .size = size }; - hashFunctionContextUpdateMC (&ctx, &chunk); - } - union { GElf_Ehdr ehdr; @@ -1381,7 +1381,7 @@ handle_build_id (DSO *dso, Elf_Data *bui goto bad; if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL) goto bad; - process (x.d_buf, x.d_size); + process (&ctx, x.d_buf, x.d_size); } x.d_type = ELF_T_SHDR; @@ -1393,14 +1393,14 @@ handle_build_id (DSO *dso, Elf_Data *bui u.shdr.sh_offset = 0; if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL) goto bad; - process (x.d_buf, x.d_size); + process (&ctx, x.d_buf, x.d_size); if (u.shdr.sh_type != SHT_NOBITS) { Elf_Data *d = elf_rawdata (dso->scn[i], NULL); if (d == NULL) goto bad; - process (d->d_buf, d->d_size); + process (&ctx, d->d_buf, d->d_size); } } }