RFR: JDK-8262199: issue in jli args.c [v3]
Christoph Langer
clanger at openjdk.java.net
Thu Feb 25 17:49:44 UTC 2021
On Thu, 25 Feb 2021 16:39:25 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> src/java.base/share/native/libjli/args.c line 378:
>>
>>> 376: if (st.st_size > MAX_ARGF_SIZE) {
>>> 377: JLI_ReportMessage(CFG_ERROR10, MAX_ARGF_SIZE);
>>> 378: reportAndExit(NULL, NULL);
>>
>> This should be just one statement,
>> reportAndExit(CFG_ERROR10, MAX_ARGF_SIZE);
>> or?
>
> I think that did not work because it does not fit the param types of reportAndExit but I can simplify it otherwise.
Ah, I see.
Maybe it's a bit bike-sheddy but as you're using reportAndExit only twice now, wouldn't it be less convoluted if you use
JLI_ReportMessage(...);
exit(1);
inline in both places?
-------------
PR: https://git.openjdk.java.net/jdk/pull/2692
More information about the core-libs-dev
mailing list