Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121707
b: refs/heads/master
c: b9ac998
h: refs/heads/master
i:
  121705: fff2e04
  121703: d192842
v: v3
  • Loading branch information
Harvey Harrison authored and David S. Miller committed Nov 4, 2008
1 parent 7fcc882 commit ef50528
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 48148938b494cd57029a43c758e9972307a31d2a
refs/heads/master: b9ac99855dcc0316ba2feee2b0d3e578f8315b75
8 changes: 6 additions & 2 deletions trunk/lib/vsprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,11 +620,15 @@ static char *ip4_addr_string(char *buf, char *end, u8 *addr, int field_width,
int precision, int flags)
{
char ip4_addr[4 * 4]; /* (4 * 3 decimal digits), 3 dots and trailing zero */
char temp[3]; /* hold each IP quad in reverse order */
char *p = ip4_addr;
int i;
int i, digits;

for (i = 0; i < 4; i++) {
p = put_dec_trunc(p, addr[i]);
digits = put_dec_trunc(temp, addr[i]) - temp;
/* reverse the digits in the quad */
while (digits--)
*p++ = temp[digits];
if (i != 3)
*p++ = '.';
}
Expand Down

0 comments on commit ef50528

Please sign in to comment.