From 706ef1337a8fccea8d75a10d73701e536d4f79b1 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Sat, 5 Apr 2014 10:36:30 +0900 Subject: Don't ignore the return value of symlink(). --- test/mruby_io_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/mruby_io_test.c b/test/mruby_io_test.c index 6a3b20f62..36e56b87c 100644 --- a/test/mruby_io_test.c +++ b/test/mruby_io_test.c @@ -112,7 +112,9 @@ static mrb_value mrb_io_test_file_setup(mrb_state *mrb, mrb_value self) { mrb_value ary = mrb_io_test_io_setup(mrb, self); - symlink("/usr/bin", "test-bin"); + if (symlink("/usr/bin", "test-bin") == -1) { + mrb_raise(mrb, E_RUNTIME_ERROR, "can't make a symbolic link"); + } return ary; } -- cgit v1.2.3