summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2015-01-10 10:50:21 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-01-10 10:50:21 +0900
commit53da1fb5a19e3f94760c913e5706ef444b0ef376 (patch)
tree513026651cc1605420542386b50a9fe87a6f6367 /mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c
parent70851aaf57bfdd3ae6e66c87c9fe2ed655980c66 (diff)
parent2b753167cafc0697509b3635b061152a9b74669e (diff)
downloadmruby-53da1fb5a19e3f94760c913e5706ef444b0ef376.tar.gz
mruby-53da1fb5a19e3f94760c913e5706ef444b0ef376.zip
Merge pull request #2697 from cubicdaiya/use-sizeof
Use sizeof() instead of strlen().
Diffstat (limited to 'mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c')
-rwxr-xr-xmrbgems/mruby-bin-debugger/tools/mrdb/apilist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c b/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c
index 999bd6328..03846cd50 100755
--- a/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c
+++ b/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c
@@ -45,7 +45,7 @@ build_path(mrb_state *mrb, const char *dir, const char *base)
len = strlen(base) + 1;
if (strcmp(dir, ".")) {
- len += strlen(dir) + strlen("/");
+ len += strlen(dir) + sizeof("/") - 1;
}
path = mrb_malloc(mrb, len);