Skip to content

Commit aabe141

Browse files
authored
Merge pull request #525 from TomasKorbar/master
Add const qualifiers to fix build with ISO C23
2 parents 1231a00 + dbe865d commit aabe141

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libfaketime.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2666,7 +2666,7 @@ int timespec_get(struct timespec *ts, int base)
26662666
static void parse_ft_string(const char *user_faked_time)
26672667
{
26682668
struct tm user_faked_time_tm;
2669-
char * tmp_time_fmt;
2669+
const char * tmp_time_fmt;
26702670
char * nstime_str;
26712671

26722672
if (!strncmp(user_faked_time, user_faked_time_saved, BUFFERLEN))
@@ -3338,7 +3338,7 @@ static void prepare_config_contents(char *contents)
33383338
bool str_array_contains(const char *haystack, const char *needle)
33393339
{
33403340
size_t needle_len = strlen(needle);
3341-
char *pos = strstr(haystack, needle);
3341+
const char *pos = strstr(haystack, needle);
33423342
while (pos) {
33433343
if (pos == haystack || *(pos - 1) == ',') {
33443344
char nextc = *(pos + needle_len);

0 commit comments

Comments
 (0)