Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ int main(int argc, char **argv)
the script */
while (optind < argc && *argv[optind] == '-') {
char *arg = argv[optind] + 1;
const char *longopt = "";
char *longopt = "";
char *optarg = NULL;
/* a single - is not an option, it also stops argument scanning */
if (!*arg)
Expand Down
2 changes: 1 addition & 1 deletion qjsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ int main(int argc, char **argv)

while (optind < argc && *argv[optind] == '-') {
char *arg = argv[optind] + 1;
const char *longopt = "";
char *longopt = "";
char *optarg = NULL;
/* a single - is not an option, it also stops argument scanning */
if (!*arg)
Expand Down
10 changes: 4 additions & 6 deletions run-test262.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,7 @@ char *skip_prefix(const char *str, const char *prefix)

char *get_basename(const char *filename)
{
char *p;

p = strrchr(filename, '/');
const char *p = strrchr(filename, '/');
if (!p)
return NULL;
return strdup_len(filename, p - filename);
Expand Down Expand Up @@ -1828,10 +1826,10 @@ int run_test(ThreadLocalStorage *tls, const char *filename, int *msec)
harness = harness_dir;

if (!harness) {
p = strstr(filename, "test/");
if (p) {
const char *p1 = strstr(filename, "test/");
if (p1) {
snprintf(harnessbuf, sizeof(harnessbuf), "%.*s%s",
(int)(p - filename), filename, "harness");
(int)(p1 - filename), filename, "harness");
}
harness = harnessbuf;
}
Expand Down
Loading