diff options
author | Guillem Jover <guillem@debian.org> | 2018-11-17 20:35:54 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2019-01-22 13:41:54 +0100 |
commit | e29648778ccd54ff834c3581b460542fdb766d44 (patch) | |
tree | 254d03b751ee9dfee54a8d220855021437a83378 /src/enquiry.c | |
parent | f94d12b62e0747791ece6400f31a15fddc3a2d5b (diff) | |
download | dpkg-e29648778ccd54ff834c3581b460542fdb766d44.tar.gz |
When allocating use the variable instead of the type in sizeof()
This makes it easier to guarantee we use the correct size for the
involved variable.
Diffstat (limited to 'src/enquiry.c')
-rw-r--r-- | src/enquiry.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/enquiry.c b/src/enquiry.c index baf26daab..632322faa 100644 --- a/src/enquiry.c +++ b/src/enquiry.c @@ -292,7 +292,7 @@ unpackchk(const char *const *argv) if (!yettobeunpacked(pkg, &thissect)) continue; for (se= sectionentries; se && strcasecmp(thissect,se->name); se= se->next); if (!se) { - se= nfmalloc(sizeof(struct sectionentry)); + se = nfmalloc(sizeof(*se)); for (sep= §ionentries; *sep && strcasecmp(thissect,(*sep)->name) > 0; sep= &(*sep)->next); |