zabbix-module-systemd icon indicating copy to clipboard operation
zabbix-module-systemd copied to clipboard

Fix comparison between pointer and zero character constant.

Open mjtrangoni opened this issue 5 years ago • 4 comments

Hi @cavaliercoder @jangaraj,

This fix #44

See,

libzbxsystemd.c: In function ‘SYSTEMD_UNIT_DISCOVERY’:
libzbxsystemd.c:214:35: warning: comparison between pointer and zero character constant [-Wpointer-compare]
  214 |         if(NULL != filter || '\0' != filter)
      |                                   ^~
libzbxsystemd.c:214:38: note: did you mean to dereference the pointer?
  214 |         if(NULL != filter || '\0' != filter)
      |

Signed-off-by: Mario Trangoni [email protected]

mjtrangoni avatar Apr 03 '20 07:04 mjtrangoni

Hi Mario, did you test discovery with this new fix?

jangaraj avatar Apr 03 '20 07:04 jangaraj

Hi @jangaraj,

No, I still have to do that. Will let you know as soon as I have it running

mjtrangoni avatar Apr 03 '20 08:04 mjtrangoni

Hi @jangaraj, The output of /usr/sbin/zabbix_agentd -t systemd.unit.discovery["socket"] is the same after the patch.

mjtrangoni avatar Apr 03 '20 12:04 mjtrangoni

ping?

mjtrangoni avatar Jul 23 '20 13:07 mjtrangoni