aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/sort
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2022-10-13 07:07:46 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2022-10-19 07:59:29 +0000
commite891183e60cee62a05d58b173fabd7876d522008 (patch)
treee7459f0dd466c7688cedf0c212383d64083065e8 /usr.bin/sort
parent2afc73005cb2c288a2445af6be10484e14ea7409 (diff)
downloadsrc-e891183e60cee62a05d58b173fabd7876d522008.tar.gz
src-e891183e60cee62a05d58b173fabd7876d522008.zip
Diffstat (limited to 'usr.bin/sort')
-rw-r--r--usr.bin/sort/file.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.bin/sort/file.c b/usr.bin/sort/file.c
index 437be09819b5..2e3b4e0a4350 100644
--- a/usr.bin/sort/file.c
+++ b/usr.bin/sort/file.c
@@ -208,9 +208,7 @@ file_list_init(struct file_list *fl, bool tmp)
{
if (fl) {
- fl->count = 0;
- fl->sz = 0;
- fl->fns = NULL;
+ memset(fl, 0, sizeof(*fl));
fl->tmp = tmp;
}
}
@@ -285,10 +283,8 @@ sort_list_init(struct sort_list *l)
{
if (l) {
- l->count = 0;
- l->size = 0;
+ memset(l, 0, sizeof(*l));
l->memsize = sizeof(struct sort_list);
- l->list = NULL;
}
}