Mercurial > libavformat.hg
comparison barpainet.c @ 885:da1d5db0ce5c libavformat
COSMETICS: Remove all trailing whitespace.
author | diego |
---|---|
date | Sat, 17 Dec 2005 18:14:38 +0000 |
parents | 05318cf2e886 |
children | d70e50f1495f |
comparison
equal
deleted
inserted
replaced
884:2ece9c9dd94c | 885:da1d5db0ce5c |
---|---|
4 #include "barpainet.h" | 4 #include "barpainet.h" |
5 | 5 |
6 int inet_aton (const char * str, struct in_addr * add) { | 6 int inet_aton (const char * str, struct in_addr * add) { |
7 const char * pch = str; | 7 const char * pch = str; |
8 unsigned int add1 = 0, add2 = 0, add3 = 0, add4 = 0; | 8 unsigned int add1 = 0, add2 = 0, add3 = 0, add4 = 0; |
9 | 9 |
10 add1 = atoi(pch); | 10 add1 = atoi(pch); |
11 pch = strpbrk(pch,"."); | 11 pch = strpbrk(pch,"."); |
12 if (pch == 0 || ++pch == 0) goto done; | 12 if (pch == 0 || ++pch == 0) goto done; |
13 add2 = atoi(pch); | 13 add2 = atoi(pch); |
14 pch = strpbrk(pch,"."); | 14 pch = strpbrk(pch,"."); |
18 if (pch == 0 || ++pch == 0) goto done; | 18 if (pch == 0 || ++pch == 0) goto done; |
19 add4 = atoi(pch); | 19 add4 = atoi(pch); |
20 | 20 |
21 done: | 21 done: |
22 add->s_addr=(add4<<24)+(add3<<16)+(add2<<8)+add1; | 22 add->s_addr=(add4<<24)+(add3<<16)+(add2<<8)+add1; |
23 | 23 |
24 return 1; | 24 return 1; |
25 } | 25 } |