Code

collectdctl: prefix may be undefined as well
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 13 Aug 2016 14:27:47 +0000 (16:27 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 13 Aug 2016 14:27:47 +0000 (16:27 +0200)
This won't happen in practice since ./configure sets it, but it isn't
set when running the code through lint.

src/collectdctl.c

index 5978b5e6c769070ae5ffb3bb7d9893729933c1c7..8c884796403edfa9c6d69aec38421d6dbad359e7 100644 (file)
 
 #include "libcollectdclient/collectd/client.h"
 
+#ifndef PREFIX
+# define PREFIX "/opt/" PACKAGE_NAME
+#endif
+
 #ifndef LOCALSTATEDIR
 # define LOCALSTATEDIR PREFIX "/var"
 #endif