r91644 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91643‎ | r91644 | r91645 >
Date:15:09, 7 July 2011
Author:ariel
Status:deferred
Tags:
Comment:
make exit codes conform with what the docs claim
Modified paths:
  • /branches/ariel/xmldumps-backup/mwbzutils/checkforbz2footer.c (modified) (history)

Diff [purge]

Index: branches/ariel/xmldumps-backup/mwbzutils/checkforbz2footer.c
@@ -19,7 +19,7 @@
2020 a bzipped file.
2121 Outputs: none.
2222 Exits with 0 if the file contains the footer at the end,
23 - 1 if the file does not contain the footer, and -1 on error.
 23+ -1 if the file does not contain the footer or there is an error.
2424 */
2525
2626
@@ -42,6 +42,11 @@
4343 bfile.footer = init_footer();
4444 result = check_file_for_footer(fin, &bfile);
4545 close(fin);
46 - exit(result);
 46+ if (result == -1) {
 47+ return(result);
 48+ }
 49+ else {
 50+ return(0);
 51+ }
4752 }
4853

Status & tagging log