File: fix-segv-with-rb_struct_define-on-64bit

package info (click to toggle)
ruby-filesystem 0.5-5.2
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 124 kB
  • sloc: ansic: 441; makefile: 86; ruby: 47
file content (29 lines) | stat: -rw-r--r-- 762 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- a/filesystem.c
+++ b/filesystem.c
@@ -113,7 +113,7 @@ static VALUE fs_stat(VALUE obj, VALUE di
 		INT2NUM(fs.f_favail),
 		INT2NUM(fs.f_flag),
 		INT2NUM(fs.f_namemax),
-		0 );
+		NULL );
 }
 
 void Init_filesystem()
@@ -124,7 +124,7 @@ void Init_filesystem()
 
 	sFSstat = rb_struct_define("FileSystemStat",
 		"path", "block_size", "blocks", "blocks_free", "blocks_avail", 
-		"files", "files_free", "files_avail", "flags", "maxnamelen", 0);
+		"files", "files_free", "files_avail", "flags", "maxnamelen", NULL);
 	rb_global_variable(&sFSstat);
 
 	sFSmount = rb_struct_define("FileSystemMount",
@@ -134,7 +134,7 @@ void Init_filesystem()
 #else
 		"dump_interval", "check_pass",
 #endif
-	       	0);
+	       	NULL);
 	rb_global_variable(&sFSmount);