summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c
diff options
context:
space:
mode:
authorTatsuhiko Kubo <[email protected]>2015-01-03 22:37:11 +0900
committerTatsuhiko Kubo <[email protected]>2015-01-03 22:37:11 +0900
commit2b753167cafc0697509b3635b061152a9b74669e (patch)
tree2557d3e6db9aee38ae5bd1edfa339943066a7b4a /mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c
parent465ce1e52846cb0ab2ce711692e376b9cf027e66 (diff)
downloadmruby-2b753167cafc0697509b3635b061152a9b74669e.tar.gz
mruby-2b753167cafc0697509b3635b061152a9b74669e.zip
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);