diff options
author | midipix <writeonce@midipix.org> | 2015-12-06 08:56:34 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-10 23:35:31 -0500 |
commit | b5c6e6b6969328711658c248d0725f543573939e (patch) | |
tree | b4ba9239f9bb1a301fe7889a2a4e15e0df85a44b /src/logic | |
parent | 85119ef1e354b05d1c8fdc7876bc83c8c1375082 (diff) | |
download | perk-b5c6e6b6969328711658c248d0725f543573939e.tar.bz2 perk-b5c6e6b6969328711658c248d0725f543573939e.tar.xz |
API redesign 9/10: struct pe_image_summary: elegance.
Diffstat (limited to 'src/logic')
-rw-r--r-- | src/logic/pe_get_image_meta.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c index acf377f..78b8b91 100644 --- a/src/logic/pe_get_image_meta.c +++ b/src/logic/pe_get_image_meta.c @@ -11,7 +11,7 @@ static int pe_free_image_meta_impl(struct pe_image_meta * meta, int status) unsigned i; if (meta) { - for (i=0; i<meta->summary.num_of_implibs; i++) + for (i=0; i<meta->summary.nimplibs; i++) free(meta->idata[i].items); free(meta->idata); @@ -124,13 +124,13 @@ int pe_get_image_meta(const struct pe_raw_image * image, struct pe_image_meta ** if (m->aidata) { /* num of implibs */ - for (pidata=m->aidata; pidata->name_rva[0]; pidata++,m->summary.num_of_implibs++); + for (pidata=m->aidata; pidata->name_rva[0]; pidata++,m->summary.nimplibs++); /* import headers */ - if (!(m->idata = calloc(m->summary.num_of_implibs,sizeof(*(m->idata))))) + if (!(m->idata = calloc(m->summary.nimplibs,sizeof(*(m->idata))))) return pe_free_image_meta_impl(m,status); - for (i=0; i<m->summary.num_of_implibs; i++) { + for (i=0; i<m->summary.nimplibs; i++) { pe_read_import_header(&m->aidata[i],&m->idata[i]); m->idata[i].name = base + m->hidata->ptr_to_raw_data |