Bugfix: string pointer dereferencing in psadwatchd.c
pillarsdotnet opened this issue · 0 comments
pillarsdotnet commented
While compiling psad for Ubuntu, I noticed the following warning:
psadwatchd.c: In function ‘exec_binary’:
psadwatchd.c:393:30: warning: comparison between pointer and zero character constant [-Wpointer-compare]
&& index != '\0' && *index != '\n') {
^~
psadwatchd.c:393:24: note: did you mean to dereference the pointer?
&& index != '\0' && *index != '\n') {
^
From inspection of the code, it would appear that index
should be *index
in the above code.
This patch fixes the problem, and also adjusts alignment to clarify the intent.