To make coverity happy we might be able to suppress this false alarm by adding a line like below:
```
/* coverity[SWAPPED_ARGUMENTS] */
lseg_closept_lseg(result, l2, l1);
```
From my point of view it's better to also put some comments for humans to understand why we are passing l1 and l2 in reverse order.