From e77330a500687eb726ef81c742d9844aa72e378e Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 17 Nov 2023 07:56:59 -0800 Subject: [PATCH] Minor fix in 2001/anonymous fix The variable used for open(2) should not be a int * but just an int. It worked but not strictly correct. --- 2001/anonymous/anonymous.c | 2 +- thanks-for-fixes.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/2001/anonymous/anonymous.c b/2001/anonymous/anonymous.c index 5f52678c2..65476effd 100644 --- a/2001/anonymous/anonymous.c +++ b/2001/anonymous/anonymous.c @@ -31,7 +31,7 @@ l an(d, sl){ c \ r=V(014 )&63,an##i(d,sl); } #define add(Ev,Gv) Ev(){ i=((a-=16)+C(r,4))/4,(\ Gv?Ev() :0) ; } Ev##n(){ a=C(r,5),Ev(); } -l f; +int f; Tr(L,r, C(r,3)&&C(r,3)<=d?(l)(((int)B)+d+C(r,4)-C(r,3)):(((int)B)^d)>>24&&--\ r,(l)d) Tr(Run,a,(ss=strcmp((F*)B+C((V(12)>>16),4)+C(--r,0),A(.strtab))?ss:(F\ *)B+C(r ,4),C(r,1)-2),0) add(Sca ,V(-~i)-P+2) add(ru,strcmp(ss+V(i),A(main))) diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index fc9d322b5..380abfe9f 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -2380,8 +2380,7 @@ binary. But again see [bugs.md](/bugs.md) here. These also had to be done: - when `open()`ing the file the file descriptor had to be saved so it could be -closed prior to executing the program. This is the `f` variable which is of type -`l`, a `#define` for `int *`. +closed prior to executing the program. This is the `f` variable which an `int`. - `munmap()` also had to be called prior to executing the program. This involved a new `off_t N` which was added in the `mmap()` call which was then used in the `munmap()` call.