Skip to content

Commit 760f0c2

Browse files
committed
Merge branch 'sk/strlen-returns-size_t' into seen
Code clean-up. The remainder needs to be reviewed. * sk/strlen-returns-size_t: date.c: Fix type missmatch warings from msvc
2 parents 83d5dab + d11d003 commit 760f0c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

date.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ static const char *approxidate_alpha(const char *date, struct tm *tm, struct tm
12441244
}
12451245

12461246
for (s = special; s->name; s++) {
1247-
int len = strlen(s->name);
1247+
size_t len = strlen(s->name);
12481248
if (match_string(date, s->name) == len) {
12491249
s->fn(tm, now, num);
12501250
*touched = 1;
@@ -1254,7 +1254,7 @@ static const char *approxidate_alpha(const char *date, struct tm *tm, struct tm
12541254

12551255
if (!*num) {
12561256
for (i = 1; i < 11; i++) {
1257-
int len = strlen(number_name[i]);
1257+
size_t len = strlen(number_name[i]);
12581258
if (match_string(date, number_name[i]) == len) {
12591259
*num = i;
12601260
*touched = 1;
@@ -1270,7 +1270,7 @@ static const char *approxidate_alpha(const char *date, struct tm *tm, struct tm
12701270

12711271
tl = typelen;
12721272
while (tl->type) {
1273-
int len = strlen(tl->type);
1273+
size_t len = strlen(tl->type);
12741274
if (match_string(date, tl->type) >= len-1) {
12751275
update_tm(tm, now, tl->length * *num);
12761276
*num = 0;

0 commit comments

Comments
 (0)