Skip to content

Commit

Permalink
ping: move variable to more narrow scope in main_loop()
Browse files Browse the repository at this point in the history
Signed-off-by: Sami Kerola <[email protected]>
  • Loading branch information
kerolasa committed Nov 19, 2019
1 parent b33d019 commit 00a161b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ping/ping_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,6 @@ int main_loop(struct ping_rts *rts, ping_func_set_st *fset, socket_st *sock,
char ans_data[4096];
struct iovec iov;
struct msghdr msg;
struct cmsghdr *c;
int cc;
int next;
int polling;
Expand Down Expand Up @@ -687,6 +686,8 @@ int main_loop(struct ping_rts *rts, ping_func_set_st *fset, socket_st *sock,
} else {

#ifdef SO_TIMESTAMP
struct cmsghdr *c;

for (c = CMSG_FIRSTHDR(&msg); c; c = CMSG_NXTHDR(&msg, c)) {
if (c->cmsg_level != SOL_SOCKET ||
c->cmsg_type != SO_TIMESTAMP)
Expand Down

0 comments on commit 00a161b

Please sign in to comment.