diff options
author | Preston Pan <135050157+ret2pop@users.noreply.github.com> | 2024-05-02 20:47:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-02 20:47:58 -0700 |
commit | 104437bf7533798087e77b07756cd6b5dcc45bcd (patch) | |
tree | d60076e1beee31c81e1f8a604f46b4fa0270d83b /src | |
parent | 4738c0ffe90fc5e46a2a31b061b76d49317b6b1e (diff) | |
parent | 3f6e346cfb9cce3e24c27c400e345eccc34697d9 (diff) |
A few fixes and improvements
Diffstat (limited to 'src')
-rw-r--r-- | src/builtins.c | 4 | ||||
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/stem.c | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/src/builtins.c b/src/builtins.c index caf18c2..d6049f3 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -540,7 +540,7 @@ void stemfread(value_t *v) { eval_error("EMPTY STACK"); return; } - char *val = ""; + char *val = NULL; size_t len = 0; FILE *fp = fopen(v1->str_word->value, "rb"); if (!fp) { @@ -1341,7 +1341,7 @@ void include(value_t *v) { eval_error("EMPTY STACK"); return; } - char *val = ""; + char *val = NULL; size_t len = 0; string_t *strval = init_string("/usr/local/share/stem/stemlib/"); string_concat(strval, v1->str_word); @@ -49,7 +49,7 @@ void sigint_handler(int signum) { int main(int argc, char **argv) { value_t *v; size_t len = 0; - char *buf = ""; + char *buf = NULL; /* Parsing arguments */ if (argc < 2) { @@ -331,8 +331,6 @@ value_t *parser_get_next(parser_t *p) { return parse_quote(p); case '\0': return NULL; - case EOF: - return NULL; default: return parse_word(p); } |