Found by smatch "double check that we're allocating correct size"
warning. Reported by and ok jsg@.
-/* $OpenBSD: fw_cfg.c,v 1.7 2023/02/06 20:33:34 dv Exp $ */
+/* $OpenBSD: fw_cfg.c,v 1.8 2024/02/04 14:53:12 dv Exp $ */
/*
* Copyright (c) 2018 Claudio Jeker <claudio@openbsd.org>
*
if (fw_cfg_lookup_file(name))
fatalx("%s: fw_cfg: file %s exists", __progname, name);
- if ((f = calloc(sizeof(*f), 1)) == NULL)
+ if ((f = calloc(1, sizeof(*f))) == NULL)
fatal("%s", __func__);
if ((f->data = malloc(len)) == NULL)