fix C++ compilation issues

Signed-off-by: Robert Andersson <robert.m.andersson@se.atlascopco.com>
This commit is contained in:
Robert Andersson committed 2018-10-22 12:51:58 +02:00
1 parent 053304012f
commit d371b85c47
6 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -352,8 +352,8 @@ static void api_cb(uev_t *w, void *arg, int events)
if (wdog) { if (wdog) {
logit(LOG_NOTICE, "Stopping and removing %s (PID:%d)", wdog->cmd, wdog->pid); logit(LOG_NOTICE, "Stopping and removing %s (PID:%d)", wdog->cmd, wdog->pid);
stop(wdog); stop(wdog);
if (wdog->protected) { if (wdog->protect) {
wdog->protected = 0; wdog->protect = 0;
wdog->runlevels = 0; wdog->runlevels = 0;
} }
} }
+1 -1
View File
@@ -125,7 +125,7 @@ error:
return NULL; return NULL;
} }
svc_t *client_svc_find(char *arg) svc_t *client_svc_find(const char *arg)
{ {
int sd = -1; int sd = -1;
struct init_request rq = { struct init_request rq = {
+1 -1
View File
@@ -32,6 +32,6 @@ int client_disconnect (void);
int client_send (struct init_request *rq, ssize_t len); int client_send (struct init_request *rq, ssize_t len);
svc_t *client_svc_iterator (int first); svc_t *client_svc_iterator (int first);
svc_t *client_svc_find (char *arg); svc_t *client_svc_find (const char *arg);
#endif /* FINIT_CLIENT_H_ */ #endif /* FINIT_CLIENT_H_ */
+1 -1
View File
@@ -909,7 +909,7 @@ recreate:
svc_mark_clean(svc); svc_mark_clean(svc);
if (!file) if (!file)
svc->protected = 1; svc->protect = 1;
/* Free duped line, from above */ /* Free duped line, from above */
free(line); free(line);
+1 -1
View File
@@ -402,7 +402,7 @@ void svc_mark_dynamic(void)
svc_t *svc, *iter = NULL; svc_t *svc, *iter = NULL;
for (svc = svc_iterator(&iter, 1); svc; svc = svc_iterator(&iter, 0)) { for (svc = svc_iterator(&iter, 1); svc; svc = svc_iterator(&iter, 0)) {
if (svc->protected) if (svc->protect)
continue; continue;
if (svc_is_inetd_conn(svc)) if (svc_is_inetd_conn(svc))
continue; continue;
+1 -1
View File
@@ -97,7 +97,7 @@ typedef struct svc {
long start_time; /* Start time, as seconds since boot, from sysinfo() */ long start_time; /* Start time, as seconds since boot, from sysinfo() */
const svc_state_t state; /* Paused, Reloading, Restart, Running, ... */ const svc_state_t state; /* Paused, Reloading, Restart, Running, ... */
svc_type_t type; /* Service, run, task, inetd, ... */ svc_type_t type; /* Service, run, task, inetd, ... */
int protected; /* Services like dbus-daemon & udev by Finit */ int protect; /* Services like dbus-daemon & udev by Finit */
const int dirty; /* -1: removal, 0: unmodified, 1: modified */ const int dirty; /* -1: removal, 0: unmodified, 1: modified */
int starting; /* ... waiting for pidfile to be re-asserted */ int starting; /* ... waiting for pidfile to be re-asserted */
int runlevels; int runlevels;