summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2019-07-05 07:34:41 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2019-07-05 07:34:41 +0000
commit5827fd0455639fbe916dbfeffc4162e7594e6697 (patch)
treecd763974730d1694e505a5625e11f12694c472ef /usr.bin
parent16d0009b8db5bfb613db8cc907fb61121ef60334 (diff)
Fix spacing and comments, no code change.
Diffstat (limited to 'usr.bin')
-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)