fixed assert on return code for NULL input values

This commit is contained in:
Bryan Graham 2014-01-27 19:43:12 +00:00
parent af5e716d6d
commit ed62358d01
2 changed files with 5 additions and 4 deletions

View File

@ -17,8 +17,8 @@
*/
char *alabel = NULL;
ck_assert_msg(strcmp( getdns_convert_alabel_to_ulabel( alabel ), "nil" ) == 0,
"Was not expecting %s from getdns_convert_alabel_to_ulabel()", getdns_convert_alabel_to_ulabel( alabel ) );
ck_assert_msg( getdns_convert_alabel_to_ulabel( alabel ) == 0,
"Was not expecting %d from getdns_convert_alabel_to_ulabel()", getdns_convert_alabel_to_ulabel( alabel ) );
}
END_TEST

View File

@ -17,8 +17,9 @@
*/
char *ulabel = NULL;
ck_assert_msg(strcmp( getdns_convert_ulabel_to_alabel( ulabel ), "nil" ) == 0,
"Was not expecting %s from getdns_convert_ulabel_to_alabel()", getdns_convert_ulabel_to_alabel( ulabel ) );
ck_assert_msg(( getdns_convert_ulabel_to_alabel( ulabel ) == 0 ),
"Was not expecting %d from getdns_convert_ulabel_to_alabel()", getdns_convert_ulabel_to_alabel( ulabel ) );
}
END_TEST