summaryrefslogtreecommitdiff
path: root/usr.bin/lex
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2017-05-31 07:20:27 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2017-05-31 07:20:27 +0000
commitbba0bb1b1b6ccbfceb333ae5bc905bf2212f193f (patch)
tree66213662c763fa98d24cca6b3bbfd43b0cb18700 /usr.bin/lex
parent4f381b0ac9bb3d235109950d659dbbf18d828c5d (diff)
we can just use void for functions that always return 0.
from Michael W. Bombardieri
Diffstat (limited to 'usr.bin/lex')
-rw-r--r--usr.bin/lex/scanopt.c5
-rw-r--r--usr.bin/lex/scanopt.h7
2 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/lex/scanopt.c b/usr.bin/lex/scanopt.c
index acab2a3c3bc..f4de1fd29b0 100644
--- a/usr.bin/lex/scanopt.c
+++ b/usr.bin/lex/scanopt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scanopt.c,v 1.5 2015/12/11 00:08:43 mmcc Exp $ */
+/* $OpenBSD: scanopt.c,v 1.6 2017/05/31 07:20:26 tedu Exp $ */
/* flex - tool to generate fast lexical analyzers */
@@ -857,7 +857,7 @@ int scanopt (svoid, arg, optindex)
}
-int scanopt_destroy (svoid)
+void scanopt_destroy (svoid)
scanopt_t *svoid;
{
struct _scanopt_t *s;
@@ -867,5 +867,4 @@ int scanopt_destroy (svoid)
free(s->aux);
free (s);
}
- return 0;
}
diff --git a/usr.bin/lex/scanopt.h b/usr.bin/lex/scanopt.h
index 5c8e8717af3..59f008bcbd8 100644
--- a/usr.bin/lex/scanopt.h
+++ b/usr.bin/lex/scanopt.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scanopt.h,v 1.2 2015/11/19 22:16:43 tedu Exp $ */
+/* $OpenBSD: scanopt.h,v 1.3 2017/05/31 07:20:26 tedu Exp $ */
/* flex - tool to generate fast lexical analyzers */
@@ -90,9 +90,8 @@ extern "C" {
scanopt_t *scanopt_init PROTO ((const optspec_t * options,
int argc, char **argv, int flags));
-/* Frees memory used by scanner.
- * Always returns 0. */
- int scanopt_destroy PROTO ((scanopt_t * scanner));
+/* Frees memory used by scanner. */
+ void scanopt_destroy PROTO ((scanopt_t * scanner));
#ifndef NO_SCANOPT_USAGE
/* Prints a usage message based on contents of optlist.