summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/file.c b/file.c
index 6b8527b268..718a38075e 100644
--- a/file.c
+++ b/file.c
@@ -294,7 +294,7 @@ rb_stat_inspect(self)
{
VALUE str;
int i;
- struct {
+ static struct {
char *name;
VALUE (*func)();
} member[] = {
@@ -329,13 +329,13 @@ rb_stat_inspect(self)
if (i == 2) { /* mode */
char buf[32];
- sprintf(buf, "0%o", NUM2INT(v));
+ sprintf(buf, "0%lo", NUM2INT(v));
rb_str_buf_cat2(str, buf);
}
else if (i == 0 || i == 6) { /* dev/rdev */
char buf[32];
- sprintf(buf, "0x%x", NUM2ULONG(v));
+ sprintf(buf, "0x%lx", NUM2ULONG(v));
rb_str_buf_cat2(str, buf);
}
else {