Skip to content

Commit

Permalink
fix exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Sep 30, 2024
1 parent b4e7bb6 commit ab38e41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions LIMEJAM.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

void version(void)
{
puts("LIMEJAM Version 1.1 by katahiromz");
puts("LIMEJAM Version 1.2 by katahiromz");
}

void usage(void)
Expand Down Expand Up @@ -158,7 +158,7 @@ int LIMEJAM_main(const char *filename, int just_sort, int keep_first_line)
qsort(pptr, count, sizeof(char *), LIMEJAM_compare_line);
ret = LIMEJAM_output(filename, count, pptr, has_bom, NULL);
LIMEJAM_free(&count, pptr);
return ret;
return ret ? 0 : 1;
}

jammer = (size_t *)malloc(count * sizeof(size_t));
Expand Down Expand Up @@ -187,7 +187,7 @@ int LIMEJAM_main(const char *filename, int just_sort, int keep_first_line)
ret = LIMEJAM_output(filename, count, pptr, has_bom, jammer);
free(jammer);
LIMEJAM_free(&count, pptr);
return ret;
return ret ? 0 : 1;
}

int main(int argc, char **argv)
Expand Down

0 comments on commit ab38e41

Please sign in to comment.