From 5404c11700ae2a9942b1bdbecea9c09aeae68703 Mon Sep 17 00:00:00 2001 From: sw1tchbl4d3 Date: Tue, 8 Mar 2022 17:03:14 +0100 Subject: [PATCH] Rename sleep_ms to sleep_us The variable name was misleading, as we didn't calculate the time to sleep in milliseconds, but in microseconds. --- rdo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rdo.c b/rdo.c index 37018f6..0d28ca6 100644 --- a/rdo.c +++ b/rdo.c @@ -47,7 +47,7 @@ void runprog(char** program_argv) { int main(int argc, char** argv) { char username[64], wrong_pw_sleep[64], session_ttl[64], password[128]; - unsigned int sleep_ms, tries, ts_ttl; + unsigned int sleep_us, tries, ts_ttl; if (argc == 1) { printf("RootDO version: %s\n\n", VERSION); @@ -70,7 +70,7 @@ int main(int argc, char** argv) { getconf(fp, "username", username, sizeof(username)); getconf(fp, "wrong_pw_sleep", wrong_pw_sleep, sizeof(wrong_pw_sleep)); getconf(fp, "session_ttl", session_ttl, sizeof(session_ttl)); - sleep_ms = atoi(wrong_pw_sleep) * 1000; + sleep_us = atoi(wrong_pw_sleep) * 1000; ts_ttl = atoi(session_ttl) * 60; fclose(fp); @@ -111,7 +111,7 @@ int main(int argc, char** argv) { runprog(&argv[1]); } - usleep(sleep_ms); + usleep(sleep_us); fprintf(stderr, "Wrong password.\n"); tries++; }