Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Dec 2017 04:05:43 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326960 - head/stand/common
Message-ID:  <201712190405.vBJ45hAn086847@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Tue Dec 19 04:05:43 2017
New Revision: 326960
URL: https://svnweb.freebsd.org/changeset/base/326960

Log:
  Simplify things a little. The RETURN macro isn't required. It's only
  used once, inside an #ifdef where it would be defined to be return.
  
  Sponsored by: Netflix

Modified:
  head/stand/common/interp.c

Modified: head/stand/common/interp.c
==============================================================================
--- head/stand/common/interp.c	Tue Dec 19 03:38:06 2017	(r326959)
+++ head/stand/common/interp.c	Tue Dec 19 04:05:43 2017	(r326960)
@@ -39,11 +39,7 @@ __FBSDID("$FreeBSD$");
 
 #ifdef BOOT_FORTH
 #include "ficl.h"
-#define	RETURN(x)	stackPushINT(bf_vm->pStack,!x); return(x)
-
 extern FICL_VM *bf_vm;
-#else
-#define	RETURN(x)	return(x)
 #endif
 
 #define	MAXARGS	20			/* maximum number of arguments allowed */
@@ -51,12 +47,10 @@ extern FICL_VM *bf_vm;
 static void	prompt(void);
 
 #ifndef BOOT_FORTH
-static int	perform(int argc, char *argv[]);
-
 /*
  * Perform the command
  */
-int
+static int
 perform(int argc, char *argv[])
 {
     int				result;
@@ -82,7 +76,7 @@ perform(int argc, char *argv[])
     } else {
 	command_errmsg = "unknown command";
     }
-    RETURN(result);
+    return(result);
 }
 #endif	/* ! BOOT_FORTH */
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712190405.vBJ45hAn086847>