summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-07-28 14:58:11 +0200
committerTobias Klauser <tklauser@distanz.ch>2015-07-28 14:58:11 +0200
commit86a6f901c041fb78fd702bd215ba0a8cf1fd7b27 (patch)
tree1527cf5186b4dfb1fc2236d758b97873f00db29c
parentad60a805498a9c31d943cb6f3de2d09b5c121b17 (diff)
llmnr-query: Consistently name variables containing number of msecs
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--llmnr-query.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/llmnr-query.c b/llmnr-query.c
index 08d6ec5..303961d 100644
--- a/llmnr-query.c
+++ b/llmnr-query.c
@@ -92,7 +92,7 @@ int main(int argc, char **argv)
int c, sock;
const char *query_name, *iface = NULL;
size_t query_name_len;
- unsigned long i, count = 1, interval = 500, timeout_msec = 1000;
+ unsigned long i, count = 1, interval_ms = 500, timeout_ms = 1000;
uint16_t qtype = LLMNR_QTYPE_A;
bool ipv6 = false;
struct pkt *p;
@@ -103,13 +103,13 @@ int main(int argc, char **argv)
count = strtoul(optarg, NULL, 0);
break;
case 'i':
- interval = strtoul(optarg, NULL, 0);
+ interval_ms = strtoul(optarg, NULL, 0);
break;
case 'I':
iface = xstrdup(optarg);
break;
case 't':
- timeout_msec = strtoul(optarg, NULL, 0);
+ timeout_ms = strtoul(optarg, NULL, 0);
break;
case 'T':
if (xstreq("A", optarg))
@@ -238,8 +238,8 @@ int main(int argc, char **argv)
FD_SET(sock, &rfds);
/* wait up to one second for a response */
- tv.tv_sec = timeout_msec / 1000;
- tv.tv_usec = (timeout_msec % 1000) * 1000;
+ tv.tv_sec = timeout_ms / 1000;
+ tv.tv_usec = (timeout_ms % 1000) * 1000;
ret = select(sock + 1, &rfds, NULL, NULL, &tv);
if (ret < 0) {
@@ -300,11 +300,11 @@ int main(int argc, char **argv)
log_info("LLMNR response: %s IN %s %s (TTL %d)\n", name, query_type(type), addr, ttl);
}
} else
- log_info("No LLMNR response received within timeout (%lu msecs)\n", timeout_msec);
+ log_info("No LLMNR response received within timeout (%lu ms)\n", timeout_ms);
if (i < count - 1) {
pkt_reset(p);
- usleep(interval * 1000);
+ usleep(interval_ms * 1000);
}
}