Skip to content

Commit cba817a

Browse files
8302838: jabswitch main() should avoid calling exit explicitly
Reviewed-by: serb
1 parent 2c52cf0 commit cba817a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ int regDisable()
440440
return err;
441441
}
442442

443-
void main(int argc, char* argv[]) {
443+
int main(int argc, char* argv[]) {
444444
bool enableWasRequested = false;
445445
bool disableWasRequested = false;
446446
bool badParams = true;
@@ -488,9 +488,6 @@ void main(int argc, char* argv[]) {
488488
} else {
489489
printf("disabled.\n");
490490
}
491-
// Use exit so test case can sense for error.
492-
if (error != 0) {
493-
exit(error);
494-
}
495491
}
492+
return error;
496493
}

0 commit comments

Comments
 (0)