[PATCH 03/21] dlls/ntdll: Use FIXME_ONCE

David Kahurani k.kahurani at gmail.com
Fri Oct 15 10:35:34 CDT 2021


introduce FIXME_ONCE

Signed-off-by: David Kahurani <k.kahurani at gmail.com>
---
 dlls/ntdll/misc.c         |  4 +---
 dlls/ntdll/unix/socket.c  | 19 ++++---------------
 dlls/ntdll/unix/system.c  |  8 +++-----
 dlls/ntdll/unix/thread.c  |  3 +--
 dlls/ntdll/unix/virtual.c |  9 +++------
 5 files changed, 12 insertions(+), 31 deletions(-)

diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
index 4b590b7..b59d163 100644
--- a/dlls/ntdll/misc.c
+++ b/dlls/ntdll/misc.c
@@ -319,9 +319,7 @@ void WINAPI WinSqmSetDWORD(HANDLE session, DWORD datapoint_id, DWORD datapoint_v
  */
 ULONG WINAPI EtwEventActivityIdControl(ULONG code, GUID *guid)
 {
-    static int once;
-
-    if (!once++) FIXME("0x%x, %p: stub\n", code, guid);
+    FIXME_ONCE("0x%x, %p: stub\n", code, guid);
     return ERROR_SUCCESS;
 }
 
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c
index 2e79b9b..6f0de26 100644
--- a/dlls/ntdll/unix/socket.c
+++ b/dlls/ntdll/unix/socket.c
@@ -1728,10 +1728,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
             }
 #else
             {
-                static int once;
-
-                if (!once++)
-                    FIXME( "IP_DONTFRAGMENT is not supported on this platform\n" );
+	         FIXME_ONCE( "IP_DONTFRAGMENT is not supported on this platform\n" );
                 ret = 0; /* fake success */
             }
 #endif
@@ -1752,10 +1749,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
         }
 #else
         {
-            static int once;
-
-            if (!once++)
-                FIXME( "IP_DONTFRAGMENT is not supported on this platform\n" );
+	     FIXME_ONCE( "IP_DONTFRAGMENT is not supported on this platform\n" );
             return STATUS_SUCCESS; /* fake success */
         }
 #endif
@@ -1934,10 +1928,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
             }
 #else
             {
-                static int once;
-
-                if (!once++)
-                    FIXME( "IPV6_DONTFRAGMENT is not supported on this platform\n" );
+                FIXME_ONCE( "IPV6_DONTFRAGMENT is not supported on this platform\n" );
                 ret = 0; /* fake success */
             }
 #endif
@@ -1958,10 +1949,8 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
         }
 #else
         {
-            static int once;
+	     FIXME_ONCE( "IPV6_DONTFRAGMENT is not supported on this platform\n" );
 
-            if (!once++)
-                FIXME( "IPV6_DONTFRAGMENT is not supported on this platform\n" );
             return STATUS_SUCCESS; /* fake success */
         }
 #endif
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
index 82c9f0d..0168efa 100644
--- a/dlls/ntdll/unix/system.c
+++ b/dlls/ntdll/unix/system.c
@@ -2399,7 +2399,6 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
     case SystemPerformanceInformation:  /* 2 */
     {
         SYSTEM_PERFORMANCE_INFORMATION spi;
-        static BOOL fixme_written = FALSE;
 
         get_performance_info( &spi );
         len = sizeof(spi);
@@ -2409,10 +2408,9 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
             else memcpy( info, &spi, len);
         }
         else ret = STATUS_INFO_LENGTH_MISMATCH;
-        if(!fixme_written) {
-            FIXME("info_class SYSTEM_PERFORMANCE_INFORMATION\n");
-            fixme_written = TRUE;
-        }
+
+        FIXME_ONCE("info_class SYSTEM_PERFORMANCE_INFORMATION\n");
+
         break;
     }
 
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
index 384ac1d..4a46bda 100644
--- a/dlls/ntdll/unix/thread.c
+++ b/dlls/ntdll/unix/thread.c
@@ -1827,8 +1827,7 @@ BOOL get_thread_times(int unix_pid, int unix_tid, LARGE_INTEGER *kernel_time, LA
     procstat_close(pstat);
     return ret;
 #else
-    static int once;
-    if (!once++) FIXME("not implemented on this platform\n");
+    FIXME_ONCE("not implemented on this platform\n");
     return FALSE;
 #endif
 }
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 6db08de..31afda5 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -4911,12 +4911,10 @@ NTSTATUS WINAPI NtFlushInstructionCache( HANDLE handle, const void *addr, SIZE_T
     }
     else
     {
-        static int once;
-        if (!once++) FIXME( "%p %p %ld other process not supported\n", handle, addr, size );
+        FIXME_ONCE( "%p %p %ld other process not supported\n", handle, addr, size );
     }
 #else
-    static int once;
-    if (!once++) FIXME( "%p %p %ld\n", handle, addr, size );
+    FIXME_ONCE( "%p %p %ld\n", handle, addr, size );
 #endif
     return STATUS_SUCCESS;
 }
@@ -4927,8 +4925,7 @@ NTSTATUS WINAPI NtFlushInstructionCache( HANDLE handle, const void *addr, SIZE_T
  */
 void WINAPI NtFlushProcessWriteBuffers(void)
 {
-    static int once = 0;
-    if (!once++) FIXME( "stub\n" );
+    FIXME_ONCE( "stub\n" );
 }
 
 
-- 
2.33.0




More information about the wine-devel mailing list