From: Antonio Borneo Date: Sun, 25 Apr 2021 20:38:32 +0000 (+0200) Subject: helper: rename camelcase symbols X-Git-Tag: v0.12.0-rc1~662 X-Git-Url: https://review.openocd.org/gitweb?a=commitdiff_plain;h=9e358ac2c0a759982064dd53a974b50ebaeb19f5;hp=3d135a5c70db67ed13cc93eeab0b700f6ef8a412;p=openocd.git helper: rename camelcase symbols No cross dependency, just changes internal to each file/function. Change-Id: I16568ddcd8304f5e6748c2e19f32421b047b0357 Signed-off-by: Antonio Borneo Reviewed-on: http://openocd.zylin.com/6300 Tested-by: jenkins --- diff --git a/src/helper/log.c b/src/helper/log.c index 36b59fe771..785a8bded6 100644 --- a/src/helper/log.c +++ b/src/helper/log.c @@ -473,11 +473,11 @@ void kept_alive(void) /* if we sleep for extended periods of time, we must invoke keep_alive() intermittently */ void alive_sleep(uint64_t ms) { - uint64_t napTime = 10; - for (uint64_t i = 0; i < ms; i += napTime) { + uint64_t nap_time = 10; + for (uint64_t i = 0; i < ms; i += nap_time) { uint64_t sleep_a_bit = ms - i; - if (sleep_a_bit > napTime) - sleep_a_bit = napTime; + if (sleep_a_bit > nap_time) + sleep_a_bit = nap_time; usleep(sleep_a_bit * 1000); keep_alive(); diff --git a/src/helper/replacements.c b/src/helper/replacements.c index f4ecb8dfcc..f8989974f9 100644 --- a/src/helper/replacements.c +++ b/src/helper/replacements.c @@ -235,14 +235,14 @@ int win_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, struct time for (i = 0; i < n_handles; i++) { if (WAIT_OBJECT_0 == WaitForSingleObject(handles[i], 0)) { if (SAFE_FD_ISSET(handle_slot_to_fd[i], rfds)) { - DWORD dwBytes; + DWORD bytes; intptr_t handle = (intptr_t) _get_osfhandle( handle_slot_to_fd[i]); if (PeekNamedPipe((HANDLE)handle, NULL, 0, - NULL, &dwBytes, NULL)) { + NULL, &bytes, NULL)) { /* check to see if gdb pipe has data available */ - if (dwBytes) { + if (bytes) { FD_SET(handle_slot_to_fd[i], &aread); retcode++; } diff --git a/src/helper/util.c b/src/helper/util.c index dcd59e6eac..be163b26da 100644 --- a/src/helper/util.c +++ b/src/helper/util.c @@ -24,7 +24,7 @@ #include "log.h" #include "time_support.h" -static int util_Jim_Command_ms(Jim_Interp *interp, +static int jim_util_ms(Jim_Interp *interp, int argc, Jim_Obj * const *argv) { @@ -45,7 +45,7 @@ static const struct command_registration util_command_handlers[] = { { .name = "ms", .mode = COMMAND_ANY, - .jim_handler = util_Jim_Command_ms, + .jim_handler = jim_util_ms, .help = "Returns ever increasing milliseconds. Used to calculate differences in time.", .usage = "",