bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Optimization for $(if ...) function


From: Rob W
Subject: Optimization for $(if ...) function
Date: Sun, 15 Oct 2017 16:49:25 +0100

The $(if ...) function uses strlen to decide if the expanded condition is true. But it only needs to know if the string is not empty, and not the length of the string.

I think it only needs to test if the first character is not nul. This is the change:

1248c1248
<       result = strlen (expansion);
---
>       result = (*expansion != '\0');

Rob.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]