Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Dec 2020 22:28:02 +0000 (UTC)
From:      Toomas Soome <tsoome@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r368261 - head/stand/ficl
Message-ID:  <202012012228.0B1MS2W0010555@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tsoome
Date: Tue Dec  1 22:28:02 2020
New Revision: 368261
URL: https://svnweb.freebsd.org/changeset/base/368261

Log:
  ficl: instead of pad, emit can use local variable
  
  Pad in forth is used as "scratchpad" and internal implementations
  should not use it. Ficl does not really follow this rule and this can fire back.
  emit has no need to use pad, we can use local variable instead.

Modified:
  head/stand/ficl/words.c

Modified: head/stand/ficl/words.c
==============================================================================
--- head/stand/ficl/words.c	Tue Dec  1 22:28:01 2020	(r368260)
+++ head/stand/ficl/words.c	Tue Dec  1 22:28:02 2020	(r368261)
@@ -1015,7 +1015,7 @@ static void twoSwap(FICL_VM *pVM)
 
 static void emit(FICL_VM *pVM)
 {
-    char *cp = pVM->pad;
+    char cp[2];
     int i;
 
 #if FICL_ROBUST > 1



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