projects
/
libc-test
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fc5db49
)
clean up dn_expand-empty regression test
author
Szabolcs Nagy
<nsz@port70.net>
Wed, 27 Aug 2014 12:46:42 +0000
(14:46 +0200)
committer
Szabolcs Nagy
<nsz@port70.net>
Wed, 27 Aug 2014 12:46:42 +0000
(14:46 +0200)
src/regression/dn_expand-empty.c
patch
|
blob
|
history
diff --git
a/src/regression/dn_expand-empty.c
b/src/regression/dn_expand-empty.c
index
62c52e3
..
130194c
100644
(file)
--- a/
src/regression/dn_expand-empty.c
+++ b/
src/regression/dn_expand-empty.c
@@
-1,4
+1,5
@@
// dn_expand should accept empty name (single \0)
// dn_expand should accept empty name (single \0)
+#define _BSD_SOURCE
#include <resolv.h>
#include "test.h"
#include <resolv.h>
#include "test.h"
@@
-7,10
+8,12
@@
int main(void)
unsigned char packet[] = "";
char name[] = "x";
int r;
unsigned char packet[] = "";
char name[] = "x";
int r;
+
r = dn_expand(packet, packet+1, packet, name, 1);
if (r!=1)
r = dn_expand(packet, packet+1, packet, name, 1);
if (r!=1)
- t_error("__dn_expand(\"\") returned %d, wanted 1\n", r);
- if (*name)
- t_error("__dn_expand(\"\") failed: got \"%s\" wanted \"\"\n", name);
+ t_error("dn_expand(\"\", name, 1) returned %d, wanted 1\n", r);
+ if (name[0])
+ t_error("dn_expand(\"\", name, 1) failed: got \"%s\" name, wanted \"\"\n", name);
+
return t_status;
}
return t_status;
}