mirror of
https://github.com/troglobit/finit.git
synced 2026-10-20 11:19:35 +00:00
Minor refactor, reuse MATCH_CMD() from conf.c in service_register()
When adding a new service option recently, I copy-pasted and forgot to update the length argument to strncasecmp(), so it was time to fix that once and for all. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
561c88a868
commit
4a8ca787d3
3 files changed
+38
-34
No files matched your search
@@ -29,6 +29,9 @@
|
||||
#include "plugin.h"
|
||||
|
||||
#define SERVICE_INTERVAL_DEFAULT 300000 /* 5 mins */
|
||||
#define MATCH_CMD(l, c, x) \
|
||||
(!strncasecmp(l, c, strlen(c)) && (x = (l) + strlen(c)))
|
||||
|
||||
extern int service_interval;
|
||||
|
||||
int api_init (uev_ctx_t *ctx);
|
||||
|
||||
Reference in new issue
Block a user