diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-08-14 05:57:43 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:57:59 -0500 |
commit | ada86316e54320a891d982c653e1070155bc8dbb (patch) | |
tree | bfecd758f4f89ff40ff7cc3a70e308516b05061c /source4/torture | |
parent | 64082214337e2ab50f0a69ca7f9bcf56762129cc (diff) | |
download | samba-ada86316e54320a891d982c653e1070155bc8dbb.tar.gz samba-ada86316e54320a891d982c653e1070155bc8dbb.tar.bz2 samba-ada86316e54320a891d982c653e1070155bc8dbb.zip |
r1820: added a strcmp_safe() that handles NULL pointers. Needed for the
search torture test, as some servers return really bad entries.
(This used to be commit c900ebb3ac18d77ab334d3bf5259b3bba547b09c)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/raw/search.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c index f91c8083a5..f1d51a8c69 100644 --- a/source4/torture/raw/search.c +++ b/source4/torture/raw/search.c @@ -512,27 +512,27 @@ static NTSTATUS multiple_search(struct smbcli_state *cli, static int search_both_compare(union smb_search_data *d1, union smb_search_data *d2) { - return strcmp(d1->both_directory_info.name.s, d2->both_directory_info.name.s); + return strcmp_safe(d1->both_directory_info.name.s, d2->both_directory_info.name.s); } static int search_standard_compare(union smb_search_data *d1, union smb_search_data *d2) { - return strcmp(d1->standard.name.s, d2->standard.name.s); + return strcmp_safe(d1->standard.name.s, d2->standard.name.s); } static int search_ea_size_compare(union smb_search_data *d1, union smb_search_data *d2) { - return strcmp(d1->ea_size.name.s, d2->ea_size.name.s); + return strcmp_safe(d1->ea_size.name.s, d2->ea_size.name.s); } static int search_directory_info_compare(union smb_search_data *d1, union smb_search_data *d2) { - return strcmp(d1->directory_info.name.s, d2->directory_info.name.s); + return strcmp_safe(d1->directory_info.name.s, d2->directory_info.name.s); } static int search_old_compare(union smb_search_data *d1, union smb_search_data *d2) { - return strcmp(d1->search.name, d2->search.name); + return strcmp_safe(d1->search.name, d2->search.name); } |