Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2019-12-24 10:28:11 -0500
committerAllan McRae <allan@archlinux.org>2020-01-07 11:40:32 +1000
commit9883015be2b2010ad541fd02b6856bfdb28fb35d (patch)
treecea21e7bc4eab89a47356f60c4b924ae3043bb42 /lib/libalpm/util.c
parentffb69c700abd6eb3b86e79e09b135029ff9104b4 (diff)
Use c99 struct initialization to avoid memset calls
This is guaranteed less error prone than calling memset and hoping the human gets the argument order correct.
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index a4d62c7c..d12a4403 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -1191,7 +1191,7 @@ cleanup:
{
int ret = b->ret;
FREE(b->line);
- memset(b, 0, sizeof(struct archive_read_buffer));
+ *b = (struct archive_read_buffer){0};
return ret;
}
}