Fixed "check returncode"

This commit is contained in:
Bandie 2018-03-19 20:43:15 +01:00
parent 99976bf2a6
commit f9456be2ec
Signed by: Bandie
GPG Key ID: C1E133BC65A822DD

View File

@ -100,9 +100,9 @@ int main(int argc, char *argv[]){
wait(&statval); wait(&statval);
if(verbose) if(verbose)
printf("Exit: %d\n", statval); printf("Exit: %d\n", WEXITSTATUS(statval));
if(statval == STATUS_OK){ if(WEXITSTATUS(statval) == STATUS_OK){
// If exit is STATUS_OK, write file with nothing in it // If exit is STATUS_OK, write file with nothing in it
FILE *f = fopen(VRFFILE, "w"); FILE *f = fopen(VRFFILE, "w");
if(f == NULL){ if(f == NULL){