aboutsummaryrefslogtreecommitdiff
path: root/toys/pending
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-02-05 08:17:25 -0600
committerRob Landley <rob@landley.net>2019-02-05 08:17:25 -0600
commit843b92406da0fd27eab77e193c8329e5cbea1fa0 (patch)
treefcd10ce867c1dc247d45b89e34b55d71b350b9e9 /toys/pending
parent11b2780ea60acd359bda7923e5d4460b3835f053 (diff)
downloadtoybox-843b92406da0fd27eab77e193c8329e5cbea1fa0.tar.gz
Suppress warnings gcc should not be making (and a comment typo).
Diffstat (limited to 'toys/pending')
-rw-r--r--toys/pending/sntp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/toys/pending/sntp.c b/toys/pending/sntp.c
index 8a061584..97f878fa 100644
--- a/toys/pending/sntp.c
+++ b/toys/pending/sntp.c
@@ -113,7 +113,7 @@ static long long nanodiff(struct timespec *old, struct timespec *new)
void sntp_main(void)
{
struct timespec tv, tv2;
- unsigned long long *pktime = (void *)toybuf, now, then, before;
+ unsigned long long *pktime = (void *)toybuf, now, then, before = before;
long long diff = 0;
struct addrinfo *ai;
union socksaddr sa;
@@ -189,12 +189,12 @@ void sntp_main(void)
// Is source address what we expect?
xstrncpy(buf, ntop(ai->ai_addr), 128);
strike = strcmp(buf, ntop((void *)&sa));
- // Does this reply's orignate timestamp match the packet we sent?
+ // Does this reply's originate timestamp match the packet we sent?
if (!FLAG(S) && !FLAG(m) && before != SWAP_BE64(pktime[3])) continue;
// Ignore packets from wrong address or with wrong mode
if (strike && !FLAG(S)) continue;
- if (!(FLAG(m) && mode==5 || FLAG(S) && mode==3 ||
- !FLAG(m) && !FLAG(S) && mode==4)) continue;
+ if (!((FLAG(m) && mode==5) || (FLAG(S) && mode==3) ||
+ (!FLAG(m) && !FLAG(S) && mode==4))) continue;
}
// If received a -S request packet, send server packet