summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d46c9ca)
raw | patch | inline | side by side (parent: d46c9ca)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 8 Jul 2017 09:52:42 +0000 (11:52 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 8 Jul 2017 09:52:42 +0000 (11:52 +0200) |
src/chrony.c | patch | blob | history |
diff --git a/src/chrony.c b/src/chrony.c
index 74dae52d6fd04dac78704ee62f3c56bc1c1308e0..6fb369a2f167b043618318b98c88764902fd5540 100644 (file)
--- a/src/chrony.c
+++ b/src/chrony.c
}
static void nreftostr(uint32_t nrefid, char *p_buf, size_t p_buf_size) {
- int i, c;
size_t j = 0;
- for (i = 0; i < 4; i++) {
- c = ntohl(nrefid) << i * 8 >> 24;
+ for (int i = 0; i < 4; i++) {
+ int c = ntohl(nrefid) << i * 8 >> 24;
if (!isalnum(c) || j + 1 >= p_buf_size)
continue;
p_buf[j++] = c;