[PATCH synaptics 2/4] Shut up a coverity warning

Peter Hutterer peter.hutterer at who-t.net
Sun Sep 14 19:03:39 PDT 2014


xf86-input-synaptics-1.8.0/src/synaptics.c:498: var_compare_op: Comparing
"end_str" to null implies that "end_str" might be null.

end_str can't be null, so no need for this check and no need to get Coverity
all confused.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/synaptics.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/synaptics.c b/src/synaptics.c
index e8a08d2..ace0ec7 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -495,7 +495,7 @@ set_softbutton_areas_option(InputInfoPtr pInfo, char *option_name, int offset)
         values[i] = value;
 
         if (next_num != end_str) {
-            if (end_str && *end_str == '%') {
+            if (*end_str == '%') {
                 in_percent |= 1 << i;
                 end_str++;
             }
-- 
1.9.3



More information about the xorg-devel mailing list