On Tue, 24 Mar 2026 19:29:44 GMT, Damon Nguyen <[email protected]> wrote:

> There are two instances within harfbuzz where the conditional checks seem 
> impossible or redundant. I have removed these redundant checks and tested the 
> changes. Everything still works as expected.
> 
> The !last_range check is logically redundant because there is the other check 
> if (unlikely (last_range)) beforehand in the same segment. This is 
> effectively similar to a null check.
> 
> The next check for peak != 0 is also redundant. This is because of if (peak 
> == 0 || coord == peak) earlier in the code that returns 1.f. So all following 
> instructions should logically be when peak is not 0.
> 
> I have reported the issue in the open harfbuzz repo here: 
> https://github.com/harfbuzz/harfbuzz/issues/5873
> 
> The issue has been updated upstream. Now, this PR proposes to update it on 
> our end as well.

This pull request has now been integrated.

Changeset: 91892948
Author:    Damon Nguyen <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/91892948ee0ac3c62bbddbbf9e6f99e746f3d72f
Stats:     3 lines in 2 files changed: 0 ins; 1 del; 2 mod

8380229: 2 Impossible or redundant condition defect groups in 2 files

Reviewed-by: honkar, prr

-------------

PR: https://git.openjdk.org/jdk/pull/30412

Reply via email to