[Linuxwacom-devel] [PATCH] travis: Hotfix Coverity's Travis integration patch

2018-06-27 Thread Jason Gerecke
Coverity has been triggering build errors for quite a while now, simply because their server returns a different success code after uploading than their script demands. We've notified them about this bug, but nothing seems to be happening. Lets just patch the broken code and move on with life.

[Linuxwacom-devel] [PATCH 1/3] Remove unnecessary free() from wcmAllocate

2018-06-27 Thread Jason Gerecke
There is no need to free the 'tool' variable, since the "error" label is only ever reached if 'tool' is already null. V575 The null pointer is passed into 'free' function. Inspect the first argument. Signed-off-by: Jason Gerecke --- src/wcmConfig.c | 1 - 1 file changed, 1 deletion(-) diff

[Linuxwacom-devel] [PATCH 3/3] Simplify boolean expression

2018-06-27 Thread Jason Gerecke
The check here is logically equivalent to (a != b) but much harder to read. Lets change that. V728 An excessive check can be simplified. The '(A && !B) || (!A && B)' expression is equivalent to the 'bool(A) != bool(B)' expression. Signed-off-by: Jason Gerecke --- src/wcmUSB.c | 6 ++ 1

[Linuxwacom-devel] [PATCH 2/3] Remove unnecessary check against 'press'

2018-06-27 Thread Jason Gerecke
The loop that this executes in only evaluates press entries to begin with, making the check here unnecessary. V547 Expression 'press' is always true. Signed-off-by: Jason Gerecke --- src/wcmCommon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/wcmCommon.c

Re: [Linuxwacom-devel] [PATCH 3/3] Simplify boolean expression

2018-06-27 Thread Peter Hutterer
On Wed, Jun 27, 2018 at 02:24:43PM -0700, Jason Gerecke wrote: > The check here is logically equivalent to (a != b) but much harder to read. > Lets change that. > > V728 An excessive check can be simplified. The '(A && !B) || (!A && B)' > expression is equivalent to the 'bool(A) != bool(B)'

Re: [Linuxwacom-devel] [PATCH 1/3] Remove unnecessary free() from wcmAllocate

2018-06-27 Thread Peter Hutterer
On Wed, Jun 27, 2018 at 02:24:41PM -0700, Jason Gerecke wrote: > There is no need to free the 'tool' variable, since the "error" label is > only ever reached if 'tool' is already null. > > V575 The null pointer is passed into 'free' function. Inspect the first > argument. > > Signed-off-by: