We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b89282 commit 9fc1bb8Copy full SHA for 9fc1bb8
qjs.c
@@ -61,18 +61,13 @@ static char **qjs__argv;
61
static BOOL is_standalone(const char *exe)
62
{
63
FILE *exe_f = fopen(exe, "rb");
64
- if (!exe_f) {
65
- perror(exe);
66
- exit(1);
67
- }
68
- if (fseek(exe_f, -trailer_size, SEEK_END) < 0) {
69
70
+ if (!exe_f)
+ return FALSE;
+ if (fseek(exe_f, -trailer_size, SEEK_END) < 0)
71
uint8_t buf[TRAILER_SIZE];
72
- if (fread(buf, 1, trailer_size, exe_f) != trailer_size) {
73
- perror("fread exe trailer");
74
75
+ if (fread(buf, 1, trailer_size, exe_f) != trailer_size)
76
fclose(exe_f);
77
78
return !memcmp(buf, trailer_magic, trailer_magic_size);
0 commit comments