diff options
| author | Tatsuhiko Kubo <[email protected]> | 2015-01-03 22:37:11 +0900 |
|---|---|---|
| committer | Tatsuhiko Kubo <[email protected]> | 2015-01-03 22:37:11 +0900 |
| commit | 2b753167cafc0697509b3635b061152a9b74669e (patch) | |
| tree | 2557d3e6db9aee38ae5bd1edfa339943066a7b4a /mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c | |
| parent | 465ce1e52846cb0ab2ce711692e376b9cf027e66 (diff) | |
| download | mruby-2b753167cafc0697509b3635b061152a9b74669e.tar.gz mruby-2b753167cafc0697509b3635b061152a9b74669e.zip | |
Use sizeof() instead of strlen().
Diffstat (limited to 'mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c')
| -rwxr-xr-x | mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c | 2 |
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); |
