summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-bin-debugger/tools
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
parent465ce1e52846cb0ab2ce711692e376b9cf027e66 (diff)
downloadmruby-2b753167cafc0697509b3635b061152a9b74669e.tar.gz
mruby-2b753167cafc0697509b3635b061152a9b74669e.zip
Use sizeof() instead of strlen().
Diffstat (limited to 'mrbgems/mruby-bin-debugger/tools')
-rwxr-xr-xmrbgems/mruby-bin-debugger/tools/mrdb/apilist.c2
-rwxr-xr-xmrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c2
2 files changed, 2 insertions, 2 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);
diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c b/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
index 5396e645e..5a500a7d4 100755
--- a/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
+++ b/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
@@ -275,7 +275,7 @@ get_command(mrb_state *mrb, mrdb_state *mrdb)
if (i == 0 && feof(stdin)) {
clearerr(stdin);
strcpy(mrdb->command, "quit");
- i += strlen("quit");
+ i += sizeof("quit") - 1;
}
if (i == MAX_COMMAND_LINE) {