From 219b2dff771d01d7be8e03adf068ac3b69a89363 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 23 Jan 2024 20:06:33 +0100 Subject: [PATCH] Cygwin: devices.h: drop useless mode check use IFTODT to generate type from mode. Signed-off-by: Corinna Vinschen --- winsup/cygwin/local_includes/devices.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/winsup/cygwin/local_includes/devices.h b/winsup/cygwin/local_includes/devices.h index 1e035f9d6..c4f061274 100644 --- a/winsup/cygwin/local_includes/devices.h +++ b/winsup/cygwin/local_includes/devices.h @@ -15,7 +15,6 @@ typedef unsigned short _minor_t; #define _minor(dev) ((dev) & ((1 << (sizeof (_minor_t) * 8)) - 1)) #define _major(dev) ((dev) >> (sizeof (_major_t) * 8)) -#include #include #include "cygheap_malloc.h" @@ -383,9 +382,7 @@ public: inline int exists () const {return exists_func (*this);} unsigned char type () const { - if (S_ISBLK (_mode)) - return DT_BLK; - return _mode >> 12; + return IFTODT (_mode); } }; -- 2.43.5