summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2013-03-15 12:52:03 +0000
committerdlg <dlg@openbsd.org>2013-03-15 12:52:03 +0000
commitf4e49ee5641fc352b91324b48eb0ad258ee5a6c3 (patch)
treef4b6fda4de53367110d96b0429b549037023e55c
parentfix up some lwarn()s that should be lwarnx()s (diff)
downloadwireguard-openbsd-f4e49ee5641fc352b91324b48eb0ad258ee5a6c3.tar.xz
wireguard-openbsd-f4e49ee5641fc352b91324b48eb0ad258ee5a6c3.zip
"correct" the order of calloc arguments.
-rw-r--r--usr.sbin/tftpd/tftpd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tftpd/tftpd.c b/usr.sbin/tftpd/tftpd.c
index 93e01e2e771..24dbab7bab8 100644
--- a/usr.sbin/tftpd/tftpd.c
+++ b/usr.sbin/tftpd/tftpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tftpd.c,v 1.10 2013/03/15 12:36:11 dlg Exp $ */
+/* $OpenBSD: tftpd.c,v 1.11 2013/03/15 12:52:03 dlg Exp $ */
/*
* Copyright (c) 2012 David Gwynne <dlg@uq.edu.au>
@@ -565,7 +565,7 @@ client_alloc()
{
struct tftp_client *client;
- client = calloc(sizeof(*client), 1);
+ client = calloc(1, sizeof(*client));
if (client == NULL)
return (NULL);
@@ -812,7 +812,7 @@ again:
client->fgetc = pf->f_getc;
client->fputc = pf->f_putc;
- client->options = options = calloc(sizeof(*client->options), NOPT);
+ client->options = options = calloc(NOPT, sizeof(*client->options));
if (options == NULL) {
ecode = 100 + ENOMEM;
goto error;