Skip to content

Commit

Permalink
libceph: use snprintf for unknown addrs
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Sage Weil committed May 19, 2011
1 parent 2dab036 commit 12a2f64
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ const char *ceph_pr_addr(const struct sockaddr_storage *ss)
break;

default:
sprintf(s, "(unknown sockaddr family %d)", (int)ss->ss_family);
snprintf(s, MAX_ADDR_STR_LEN, "(unknown sockaddr family %d)",
(int)ss->ss_family);
}

return s;
Expand Down

0 comments on commit 12a2f64

Please sign in to comment.