Commit bf09bf76 authored by Lev Walkin's avatar Lev Walkin

hide junk test code if not -DJUNKTEST

parent 0bfea56d
...@@ -85,6 +85,7 @@ srandomdev(void) { ...@@ -85,6 +85,7 @@ srandomdev(void) {
#else /* !JUNKTEST */ #else /* !JUNKTEST */
#define JUNKOPT #define JUNKOPT
#define RANDOPT
#endif /* JUNKTEST */ #endif /* JUNKTEST */
/* Debug output function */ /* Debug output function */
...@@ -432,6 +433,7 @@ main(int ac, char *av[]) { ...@@ -432,6 +433,7 @@ main(int ac, char *av[]) {
/* /*
* Decode the encoded structure from file. * Decode the encoded structure from file.
*/ */
#ifdef JUNKTEST
if(isyntax == ATS_RANDOM) { if(isyntax == ATS_RANDOM) {
structure = NULL; structure = NULL;
if(asn_random_fill(pduType, &structure, random_max_size) != 0) { if(asn_random_fill(pduType, &structure, random_max_size) != 0) {
...@@ -442,9 +444,12 @@ main(int ac, char *av[]) { ...@@ -442,9 +444,12 @@ main(int ac, char *av[]) {
errno = EINVAL; errno = EINVAL;
} }
} else { } else {
#endif
structure = data_decode_from_file(isyntax, pduType, file, name, structure = data_decode_from_file(isyntax, pduType, file, name,
suggested_bufsize, first_pdu); suggested_bufsize, first_pdu);
#ifdef JUNKTEST
} }
#endif
if(!structure) { if(!structure) {
if(errno) { if(errno) {
/* Error message is already printed */ /* Error message is already printed */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment