[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Return NULL instead of calling exit in pkl_new
|
From: |
Tim Rühsen |
|
Subject: |
[PATCH] Return NULL instead of calling exit in pkl_new |
|
Date: |
Fri, 10 Apr 2020 20:36:15 +0200 |
2020-04-10 Tim Rühsen <address@hidden>
* lib/pkl.c (pkl_new): Return NULL instead of calling exit.
---
ChangeLog | 4 ++++
lib/pkl.c | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/pkl.c b/lib/pkl.c
index 75db7b35..ac6dc7a3 100644
--- a/lib/pkl.c
+++ b/lib/pkl.c
@@ -86,7 +86,7 @@ pkl_new (pvm vm, const char *rt_path)
pk_term_end_class ("error");
pk_puts ("compiler failed to bootstrap itself\n");
- exit (EXIT_FAILURE);
+ return NULL;
}
free (poke_rt_pk);
@@ -98,7 +98,7 @@ pkl_new (pvm vm, const char *rt_path)
char *poke_std_pk = pk_str_concat (rt_path, "/std.pk", NULL);
if (!pkl_compile_file (compiler, poke_std_pk))
- exit (EXIT_FAILURE);
+ return NULL;
free (poke_std_pk);
}
--
2.26.0
- [PATCH] Return NULL instead of calling exit in pkl_new,
Tim Rühsen <=