mruby-io/file.c: use ptrdiff_t for pointer difference

This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-03-24 22:30:53 +09:00
parent dd2950211c
commit b8351d6191
+2 -2
View File
@@ -361,7 +361,7 @@ path_parse(mrb_state *mrb, mrb_value ary, const char *path, int ai)
SKIP_DIRSEP(path);
const char *path0 = path;
NEXT_DIRSEP(path);
int len = path - path0;
ptrdiff_t len = path - path0;
if (len == 0) {
break;
}
@@ -412,7 +412,7 @@ path_gethome(mrb_state *mrb, const char **pathp)
const char *username = ++*pathp;
NEXT_DIRSEP(*pathp);
int len = *pathp - username;
ptrdiff_t len = *pathp - username;
if (len == 0) {
home = getenv("HOME");