Browse Source

updated software-wachdog to make it comply with ISO C++

thomas 4 years ago
parent
commit
fc013f9910
2 changed files with 2 additions and 2 deletions
  1. 1 1
      include/software_watchdog.h
  2. 1 1
      src/software_watchdog.c

+ 1 - 1
include/software_watchdog.h

@@ -28,7 +28,7 @@ typedef struct {
 } SoftwareWatchdog;
 
 // return -1 on error
-int swd_setup(SoftwareWatchdog *watchdog, char *name, timeout_cb_t timeout_cb, struct timespec timeout, void *userData);
+int swd_setup(SoftwareWatchdog *watchdog, const char *name, timeout_cb_t timeout_cb, struct timespec timeout, void *userData);
 int swd_enable(SoftwareWatchdog *watchdog);
 void swd_disable(SoftwareWatchdog *watchdog);
 void swd_kick(SoftwareWatchdog *watchdog);

+ 1 - 1
src/software_watchdog.c

@@ -155,7 +155,7 @@ void *timer (void *data) {
     }
 }
 
-int swd_setup(SoftwareWatchdog* watchdog, char *name, timeout_cb_t timeout_cb, struct timespec timeout, void *userData){
+int swd_setup(SoftwareWatchdog* watchdog, const char *name, timeout_cb_t timeout_cb, struct timespec timeout, void *userData){
     // TODO: check input parameters
     watchdog->name = strdup(name);
     watchdog->timeout_cb = timeout_cb;