aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-12-29 21:26:28 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-12-29 21:26:28 +0100
commit96c5f54fea94a059993e3822fbf4b91d0d45bcba (patch)
treecf1acbbdda099e7d253f987e452e9b67859ef56e
parent7e0fbe82f705a48f5f2d6ebffab3b86ba2799711 (diff)
Use const char *
-rw-r--r--cbs.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/cbs.h b/cbs.h
index fed1555..923737f 100644
--- a/cbs.h
+++ b/cbs.h
@@ -172,9 +172,9 @@ static bool fexists(char *);
The fmdnewer() and fmdolder() functions are wrappers around fmdcmp() that
return true when the LHS is newer or older than the RHS respectively. */
-static int fmdcmp(char *, char *);
-static bool fmdolder(char *, char *);
-static bool fmdnewer(char *, char *);
+static int fmdcmp(const char *, const char *);
+static bool fmdolder(const char *, const char *);
+static bool fmdnewer(const char *, const char *);
/* Rebuild the build script if either it, or this header file have been
modified, and execute the newly built script. You should call the rebuild()
@@ -493,7 +493,7 @@ fexists(char *f)
}
int
-fmdcmp(char *lhs, char *rhs)
+fmdcmp(const char *lhs, const char *rhs)
{
struct stat sbl, sbr;
@@ -508,13 +508,13 @@ fmdcmp(char *lhs, char *rhs)
}
bool
-fmdnewer(char *lhs, char *rhs)
+fmdnewer(const char *lhs, const char *rhs)
{
return fmdcmp(lhs, rhs) > 0;
}
bool
-fmdolder(char *lhs, char *rhs)
+fmdolder(const char *lhs, const char *rhs)
{
return fmdcmp(lhs, rhs) < 0;
}