Browse Source

fixed compile warning (#646)

pull/648/head
Logan oos Even 4 years ago
committed by GitHub
parent
commit
e47b492c4d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/edge_utils.c
  2. 2
      src/sn_utils.c

6
src/edge_utils.c

@ -1670,7 +1670,7 @@ static void readFromMgmtSocket (n2n_edge_t *eee, int *keep_running) {
HASH_ITER(hh, eee->pending_peers, peer, tmpPeer) {
++num_pending_peers;
net = htonl(peer->dev_addr.net_addr);
sprintf (time_buf, "%9u", now - peer->last_seen);
sprintf (time_buf, "%9u", (unsigned int)(now - peer->last_seen));
msg_len += snprintf((char *) (udp_buf + msg_len), (N2N_PKT_BUF_SIZE - msg_len),
"%4u | %-15s | %-17s | %-21s | %-15s | %9s\n",
++num,
@ -1694,7 +1694,7 @@ static void readFromMgmtSocket (n2n_edge_t *eee, int *keep_running) {
HASH_ITER(hh, eee->known_peers, peer, tmpPeer) {
++num_known_peers;
net = htonl(peer->dev_addr.net_addr);
sprintf (time_buf, "%9u", now - peer->last_seen);
sprintf (time_buf, "%9u", (unsigned int)(now - peer->last_seen));
msg_len += snprintf((char *) (udp_buf + msg_len), (N2N_PKT_BUF_SIZE - msg_len),
"%4u | %-15s | %-17s | %-21s | %-15s | %9s\n",
++num,
@ -1718,7 +1718,7 @@ static void readFromMgmtSocket (n2n_edge_t *eee, int *keep_running) {
HASH_ITER(hh, eee->conf.supernodes, peer, tmpPeer) {
net = htonl(peer->dev_addr.net_addr);
sprintf (time_buf, "%9u", now - peer->last_seen);
sprintf (time_buf, "%9u", (unsigned int)(now - peer->last_seen));
msg_len += snprintf((char *) (udp_buf + msg_len), (N2N_PKT_BUF_SIZE - msg_len),
"%4u | %-3s %-11s | %-17s | %-21s | %-15s | %9s\n",
++num,

2
src/sn_utils.c

@ -1055,7 +1055,7 @@ static int process_mgmt (n2n_sn_t *sss,
num = 0;
HASH_ITER(hh, community->edges, peer, tmpPeer) {
sprintf (time_buf, "%9u", now - peer->last_seen);
sprintf (time_buf, "%9u", (unsigned int)(now - peer->last_seen));
ressize += snprintf(resbuf + ressize, N2N_SN_PKTBUF_SIZE - ressize,
"%4u | %-19s | %-17s | %-21s %-3s | %-15s | %9s\n",
++num,

Loading…
Cancel
Save