summaryrefslogtreecommitdiffstats
path: root/nsprpub/pr/tests/addrstr.c
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-01-02 21:01:38 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-01-02 21:01:38 +0100
commitf7d30133221896638f7bf4f66c504255c4b14f48 (patch)
tree5f3e07a049f388a3a309a615b8884318f6668a98 /nsprpub/pr/tests/addrstr.c
parent26b297510a11758727438df4669357a2a2bc42ce (diff)
downloadUXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar
UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.gz
UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.lz
UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.xz
UXP-f7d30133221896638f7bf4f66c504255c4b14f48.zip
Issue #1338 - Part 1: Update NSPR to 4.24
Diffstat (limited to 'nsprpub/pr/tests/addrstr.c')
-rw-r--r--nsprpub/pr/tests/addrstr.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/nsprpub/pr/tests/addrstr.c b/nsprpub/pr/tests/addrstr.c
index 4e830a718..b6736a74b 100644
--- a/nsprpub/pr/tests/addrstr.c
+++ b/nsprpub/pr/tests/addrstr.c
@@ -19,12 +19,12 @@ const char *testaddrs[] = {
"::FFFE:9504:3501", "::fffe:9504:3501",
"0:0:1:0:35c:0:0:0", "0:0:1:0:35c::",
"0:0:3f4c:0:0:4552:0:0", "::3f4c:0:0:4552:0:0",
- "0:0:1245:0:0:0:0567:0", "0:0:1245::567:0",
- "0:1:2:3:4:5:6:7", "0:1:2:3:4:5:6:7",
- "1:2:3:0:4:5:6:7", "1:2:3:0:4:5:6:7",
- "1:2:3:4:5:6:7:0", "1:2:3:4:5:6:7:0",
- "1:2:3:4:5:6:7:8", "1:2:3:4:5:6:7:8",
- "1:2:3:4:5:6::7", "1:2:3:4:5:6:0:7",
+ "0:0:1245:0:0:0:0567:0", "0:0:1245::567:0",
+ "0:1:2:3:4:5:6:7", "0:1:2:3:4:5:6:7",
+ "1:2:3:0:4:5:6:7", "1:2:3:0:4:5:6:7",
+ "1:2:3:4:5:6:7:0", "1:2:3:4:5:6:7:0",
+ "1:2:3:4:5:6:7:8", "1:2:3:4:5:6:7:8",
+ "1:2:3:4:5:6::7", "1:2:3:4:5:6:0:7",
0
};
@@ -49,23 +49,23 @@ int main(int argc, char **argv)
PRStatus rv;
while ((in = *nexttestaddr++) != 0) {
- expected_out = *nexttestaddr++;
- rv = PR_StringToNetAddr(in, &addr);
- if (rv) {
- printf("cannot convert %s to addr: %d\n", in, rv);
+ expected_out = *nexttestaddr++;
+ rv = PR_StringToNetAddr(in, &addr);
+ if (rv) {
+ printf("cannot convert %s to addr: %d\n", in, rv);
failed_already = 1;
- continue;
- }
- rv = PR_NetAddrToString(&addr, buf, sizeof(buf));
- if (rv) {
- printf("cannot convert %s back to string: %d\n", in, rv);
+ continue;
+ }
+ rv = PR_NetAddrToString(&addr, buf, sizeof(buf));
+ if (rv) {
+ printf("cannot convert %s back to string: %d\n", in, rv);
failed_already = 1;
- continue;
- }
- if (strcmp(buf, expected_out)) {
+ continue;
+ }
+ if (strcmp(buf, expected_out)) {
/* This is not necessarily an error */
- printf("%s expected %s got %s\n", in, expected_out, buf);
- }
+ printf("%s expected %s got %s\n", in, expected_out, buf);
+ }
}
while ((in = *nextbadaddr++) != 0) {
if (PR_StringToNetAddr(in, &addr) == PR_SUCCESS) {