ref: 5e304164f4acfdd78208838a64185f833a7d48db
parent: 1d4b554015ba6bb9cce2902a648e4b5af2811df5
author: Ori Bernstein <ori@eigenstate.org>
date: Thu May 10 20:14:15 EDT 2018
Check return value of getcwd. Some systems warn.
--- a/6/gengas.c
+++ b/6/gengas.c
@@ -350,7 +350,8 @@
char cwd[1024];
resetregs();
- getcwd(cwd, sizeof cwd);
+ if (!getcwd(cwd, sizeof cwd))
+ die("getcwd failed: %s\n", cwd);
is.reglocs = mkht(varhash, vareq);
is.name = fn->name;
is.stkoff = fn->stkoff;