Use string equality wrappers

This commit is contained in:
Tau
2019-05-13 16:49:18 -04:00
parent a96e625a36
commit 07237730cd
7 changed files with 18 additions and 10 deletions

View File

@ -9,6 +9,8 @@
#include "platform/hwmon.h"
#include "util/str.h"
enum {
HWMON_IOCTL_READ_CPU_TEMP = 0x80006000,
};
@ -46,7 +48,7 @@ static HRESULT hwmon_handle_irp(struct irp *irp)
static HRESULT hwmon_handle_open(struct irp *irp)
{
if (wcscmp(irp->open_filename, L"\\\\.\\sghwmonitor") != 0) {
if (!wstr_ieq(irp->open_filename, L"\\\\.\\sghwmonitor")) {
return iohook_invoke_next(irp);
}

View File

@ -2,13 +2,14 @@
#include <assert.h>
#include <string.h>
#include "util/dprintf.h"
#include "util/dump.h"
#include "hook/iohook.h"
#include "platform/nusec.h"
#include "util/dprintf.h"
#include "util/dump.h"
#include "util/str.h"
enum {
NUSEC_IOCTL_PING = 0x22A114,
NUSEC_IOCTL_ERASE_TRACE_LOG = 0x22E188,
@ -87,7 +88,7 @@ static HRESULT nusec_handle_irp(struct irp *irp)
static HRESULT nusec_handle_open(struct irp *irp)
{
if (wcscmp(irp->open_filename, L"\\??\\FddDriver") != 0) {
if (!wstr_ieq(irp->open_filename, L"\\??\\FddDriver")) {
return iohook_invoke_next(irp);
}