summaryrefslogtreecommitdiff
path: root/src/enquiry.c
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2018-11-17 20:35:54 +0100
committerGuillem Jover <guillem@debian.org>2019-01-22 13:41:54 +0100
commite29648778ccd54ff834c3581b460542fdb766d44 (patch)
tree254d03b751ee9dfee54a8d220855021437a83378 /src/enquiry.c
parentf94d12b62e0747791ece6400f31a15fddc3a2d5b (diff)
downloaddpkg-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.c2
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= &sectionentries;
*sep && strcasecmp(thissect,(*sep)->name) > 0;
sep= &(*sep)->next);