summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Balmer <mbalmer@cvs.openbsd.org>2006-12-15 16:49:40 +0000
committerMarc Balmer <mbalmer@cvs.openbsd.org>2006-12-15 16:49:40 +0000
commit0dd542da4d68072ee11e22864b1793cbe8e807c5 (patch)
treea5f480ce4fd43190faa57ab1ac94158e1c76c0c6
parent3f0bd9acab5cfd58b7959a4519433f2853d65c2b (diff)
Correct order of malloc(9) arguments.
Spotted by Constantine A. Murenin <cnst+openbsd@bugmail.mojo.ru>; thanks.
-rw-r--r--sys/kern/tty_nmea.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/tty_nmea.c b/sys/kern/tty_nmea.c
index 44099642b70..4ecac849707 100644
--- a/sys/kern/tty_nmea.c
+++ b/sys/kern/tty_nmea.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty_nmea.c,v 1.13 2006/11/29 13:26:50 mbalmer Exp $ */
+/* $OpenBSD: tty_nmea.c,v 1.14 2006/12/15 16:49:39 mbalmer Exp $ */
/*
* Copyright (c) 2006 Marc Balmer <mbalmer@openbsd.org>
@@ -84,7 +84,7 @@ nmeaopen(dev_t dev, struct tty *tp)
return (ENODEV);
if ((error = suser(p, 0)) != 0)
return (error);
- np = malloc(sizeof(struct nmea), M_WAITOK, M_DEVBUF);
+ np = malloc(sizeof(struct nmea), M_DEVBUF, M_WAITOK);
bzero(np, sizeof(*np));
snprintf(np->time.device, sizeof(np->time.device), "nmea%d",
nmea_count++);