sta
minimal & simple status monitoring app.
git clone https://git.pi66.xyz/sta
About | Files | Commits | Refs | License
fix: add const qualifiers
Author: pi66
Date: 2026-05-21 18:58
commit: 7018965e
Stat
| M | sta.c | 6 | +3 | -3 |
Diff
diff --git a/sta.c b/sta.c
index dcbc329..44dbcfa 100644
--- a/sta.c
+++ b/sta.c
@@ -12,8 +12,8 @@
typedef struct{
const char *(*func)(const char *);
- char *fmt;
- char *parm;
+ const char *fmt;
+ const char *parm;
int id;
int delay;
}Args;
@@ -46,7 +46,7 @@ Pros *init()
return list;
}
-void add_pro(Pros *list, int id, char *name)
...
Show all
Show less
diff --git a/sta.c b/sta.c
index dcbc329..44dbcfa 100644
--- a/sta.c
+++ b/sta.c
@@ -12,8 +12,8 @@
typedef struct{
const char *(*func)(const char *);
- char *fmt;
- char *parm;
+ const char *fmt;
+ const char *parm;
int id;
int delay;
}Args;
@@ -46,7 +46,7 @@ Pros *init()
return list;
}
-void add_pro(Pros *list, int id, char *name)
...
diff --git a/sta.c b/sta.c
index dcbc329..44dbcfa 100644
--- a/sta.c
+++ b/sta.c
@@ -12,8 +12,8 @@
typedef struct{
const char *(*func)(const char *);
- char *fmt;
- char *parm;
+ const char *fmt;
+ const char *parm;
int id;
int delay;
}Args;
@@ -46,7 +46,7 @@ Pros *init()
return list;
}
-void add_pro(Pros *list, int id, char *name)
+void add_pro(Pros *list, int id, const char *name)
{
for (int i = 0; i < list->count; ++i) {
if (id == list->process[i].id) {