From: tedu Date: Wed, 31 May 2017 07:20:26 +0000 (+0000) Subject: we can just use void for functions that always return 0. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=72d0ee88f249f660f25806fe01e2020968026f03;p=openbsd we can just use void for functions that always return 0. from Michael W. Bombardieri --- 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.