From bb792a1f7eb7e9dff37d8e538219cc0a00207bf8 Mon Sep 17 00:00:00 2001 From: endolith Date: Fri, 21 Oct 2022 10:31:48 -0400 Subject: [PATCH] Add hid_exit() to test.c when handle not found (#471) --- README.md | 3 +-- hidtest/test.c | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8c5978f..3dd62e8 100644 --- a/README.md +++ b/README.md @@ -119,8 +119,7 @@ int main(int argc, char* argv[]) handle = hid_open(0x4d8, 0x3f, NULL); if (!handle) { printf("Unable to open device\n"); - - hid_exit() + hid_exit(); return 1; } diff --git a/hidtest/test.c b/hidtest/test.c index a3207c4..4aab76b 100644 --- a/hidtest/test.c +++ b/hidtest/test.c @@ -118,6 +118,7 @@ int main(int argc, char* argv[]) handle = hid_open(0x4d8, 0x3f, NULL); if (!handle) { printf("unable to open device\n"); + hid_exit(); return 1; }