summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorratchov <ratchov@openbsd.org>2019-07-05 07:34:40 +0000
committerratchov <ratchov@openbsd.org>2019-07-05 07:34:40 +0000
commit202bc2e6ce038da32f572a4fb06defb1f534b270 (patch)
treeaaf92cf4f9623585ea1e5dbd359e599305ac993e
parentrevert header removal that snuck into previous (diff)
downloadwireguard-openbsd-202bc2e6ce038da32f572a4fb06defb1f534b270.tar.xz
wireguard-openbsd-202bc2e6ce038da32f572a4fb06defb1f534b270.zip
Fix spacing and comments, no code change.
-rw-r--r--usr.bin/aucat/utils.c10
-rw-r--r--usr.bin/sndiod/utils.c10
2 files changed, 12 insertions, 8 deletions
diff --git a/usr.bin/aucat/utils.c b/usr.bin/aucat/utils.c
index 406204303b1..08471c2c147 100644
--- a/usr.bin/aucat/utils.c
+++ b/usr.bin/aucat/utils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utils.c,v 1.5 2017/01/03 07:25:16 ratchov Exp $ */
+/* $OpenBSD: utils.c,v 1.6 2019/07/05 07:34:40 ratchov Exp $ */
/*
* Copyright (c) 2003-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -16,7 +16,7 @@
*/
/*
* log_xxx() routines are used to quickly store traces into a trace buffer.
- * This allows trances to be collected during time sensitive operations without
+ * This allows traces to be collected during time sensitive operations without
* disturbing them. The buffer can be flushed on standard error later, when
* slow syscalls are no longer disruptive, e.g. at the end of the poll() loop.
*/
@@ -50,7 +50,7 @@ unsigned int log_sync = 1; /* if true, flush after each '\n' */
void
log_flush(void)
{
- if (log_used == 0)
+ if (log_used == 0)
return;
write(STDERR_FILENO, log_buf, log_used);
log_used = 0;
@@ -140,7 +140,9 @@ panic(void)
}
/*
- * allocate a (small) amount of memory, and abort if it fails
+ * allocate 'size' bytes of memory (with size > 0). This functions never
+ * fails (and never returns NULL), if there isn't enough memory then
+ * abort the program.
*/
void *
xmalloc(size_t size)
diff --git a/usr.bin/sndiod/utils.c b/usr.bin/sndiod/utils.c
index 130bb293e96..175b61bae79 100644
--- a/usr.bin/sndiod/utils.c
+++ b/usr.bin/sndiod/utils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utils.c,v 1.4 2017/01/03 06:53:20 ratchov Exp $ */
+/* $OpenBSD: utils.c,v 1.5 2019/07/05 07:34:40 ratchov Exp $ */
/*
* Copyright (c) 2003-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -16,7 +16,7 @@
*/
/*
* log_xxx() routines are used to quickly store traces into a trace buffer.
- * This allows trances to be collected during time sensitive operations without
+ * This allows traces to be collected during time sensitive operations without
* disturbing them. The buffer can be flushed on standard error later, when
* slow syscalls are no longer disruptive, e.g. at the end of the poll() loop.
*/
@@ -50,7 +50,7 @@ unsigned int log_sync = 1; /* if true, flush after each '\n' */
void
log_flush(void)
{
- if (log_used == 0)
+ if (log_used == 0)
return;
write(STDERR_FILENO, log_buf, log_used);
log_used = 0;
@@ -140,7 +140,9 @@ panic(void)
}
/*
- * allocate a (small) amount of memory, and abort if it fails
+ * allocate 'size' bytes of memory (with size > 0). This functions never
+ * fails (and never returns NULL), if there isn't enough memory then
+ * abort the program.
*/
void *
xmalloc(size_t size)