diff options
Diffstat (limited to 'src/port/ntapi_port_name_helper.c')
-rw-r--r-- | src/port/ntapi_port_name_helper.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/port/ntapi_port_name_helper.c b/src/port/ntapi_port_name_helper.c index bd55f5b..369cbd4 100644 --- a/src/port/ntapi_port_name_helper.c +++ b/src/port/ntapi_port_name_helper.c @@ -57,18 +57,12 @@ int32_t __stdcall __ntapi_tt_port_type_from_guid( { int itype; int isubtype; - const nt_guid * src_guid; - uint32_t guid_hash; - uint32_t src_hash; - - guid_hash = __ntapi->tt_buffer_crc32(0,guid,sizeof(nt_guid)); for (itype=0; itype<NT_PORT_TYPE_CAP; itype++) { for (isubtype=0; isubtype<NT_PORT_SUBTYPE_CAP; isubtype++) { - src_guid = &(__port_guids[itype][isubtype]); - src_hash = __ntapi->tt_buffer_crc32(0,src_guid,sizeof(nt_guid)); - - if (guid_hash == src_hash) { + if (!(__ntapi_tt_guid_compare( + &__port_guids[itype][isubtype], + guid))) { *type = (nt_port_type)itype; *subtype = (nt_port_subtype)isubtype; @@ -77,8 +71,7 @@ int32_t __stdcall __ntapi_tt_port_type_from_guid( } } - return NT_STATUS_INVALID_PARAMETER; - + return NT_STATUS_NOT_FOUND; } |