nooc

nooc programming language compiler
git clone git://git.nihaljere.xyz/nooc
Log | Files | Refs | LICENSE

commit bdfb6b8772fefcd9248f916f8fa5f32b99778d2c
parent 31e2894e2471294731023653f74bd9c3aa076fe6
Author: Nihal Jere <nihal@nihaljere.xyz>
Date:   Thu,  3 Feb 2022 12:46:26 -0600

move statbuf inside main

Diffstat:
Mmain.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/main.c b/main.c @@ -143,8 +143,6 @@ gentoplevel(struct toplevel *toplevel, const struct block *const block) stackpop(&blocks); } -struct stat statbuf; - int main(int argc, char *argv[]) { @@ -161,6 +159,7 @@ main(int argc, char *argv[]) return 1; } + struct stat statbuf; if (fstat(in, &statbuf) < 0) { close(in); fprintf(stderr, "failed to stat in file\n");