all: reformat code to clang shipped with Fedora 39

This commit is contained in:
Fernando Fernandez Mancera
2023-12-06 10:18:51 +01:00
parent 5426bdf4a1
commit e68bedd28d
21 changed files with 23 additions and 23 deletions

View File

@@ -6,7 +6,7 @@
#ifndef __NETWORKMANAGER_TYPES_H__ #ifndef __NETWORKMANAGER_TYPES_H__
#define __NETWORKMANAGER_TYPES_H__ #define __NETWORKMANAGER_TYPES_H__
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_DAEMON) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_DAEMON)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -55,9 +55,9 @@ typedef enum {
_NM_SUPPL_CAP_TYPE_NUM, _NM_SUPPL_CAP_TYPE_NUM,
} NMSupplCapType; } NMSupplCapType;
#define NM_SUPPL_CAP_MASK_NO(type) ((NMSupplCapMask) (1llu << ((type) *2u))) #define NM_SUPPL_CAP_MASK_NO(type) ((NMSupplCapMask) (1llu << ((type) * 2u)))
#define NM_SUPPL_CAP_MASK_YES(type) ((NMSupplCapMask) (2llu << ((type) *2u))) #define NM_SUPPL_CAP_MASK_YES(type) ((NMSupplCapMask) (2llu << ((type) * 2u)))
#define NM_SUPPL_CAP_MASK_MASK(type) ((NMSupplCapMask) (3llu << ((type) *2u))) #define NM_SUPPL_CAP_MASK_MASK(type) ((NMSupplCapMask) (3llu << ((type) * 2u)))
typedef enum { typedef enum {
NM_SUPPL_CAP_MASK_NONE = 0, NM_SUPPL_CAP_MASK_NONE = 0,

View File

@@ -6,7 +6,7 @@
#ifndef __NM_DBUS_HELPERS_PRIVATE_H__ #ifndef __NM_DBUS_HELPERS_PRIVATE_H__
#define __NM_DBUS_HELPERS_PRIVATE_H__ #define __NM_DBUS_HELPERS_PRIVATE_H__
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -6,7 +6,7 @@
#ifndef __NM_DHCP4_CONFIG_H__ #ifndef __NM_DHCP4_CONFIG_H__
#define __NM_DHCP4_CONFIG_H__ #define __NM_DHCP4_CONFIG_H__
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -6,7 +6,7 @@
#ifndef __NM_DHCP6_CONFIG_H__ #ifndef __NM_DHCP6_CONFIG_H__
#define __NM_DHCP6_CONFIG_H__ #define __NM_DHCP6_CONFIG_H__
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -6,7 +6,7 @@
#ifndef __NM_DNS_MANAGER_H__ #ifndef __NM_DNS_MANAGER_H__
#define __NM_DNS_MANAGER_H__ #define __NM_DNS_MANAGER_H__
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -7,7 +7,7 @@
#ifndef __NM_IP4_CONFIG_H__ #ifndef __NM_IP4_CONFIG_H__
#define __NM_IP4_CONFIG_H__ #define __NM_IP4_CONFIG_H__
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -7,7 +7,7 @@
#ifndef __NM_IP6_CONFIG_H__ #ifndef __NM_IP6_CONFIG_H__
#define __NM_IP6_CONFIG_H__ #define __NM_IP6_CONFIG_H__
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -6,7 +6,7 @@
#ifndef __NM_OBJECT_PRIVATE_H__ #ifndef __NM_OBJECT_PRIVATE_H__
#define __NM_OBJECT_PRIVATE_H__ #define __NM_OBJECT_PRIVATE_H__
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -6,7 +6,7 @@
#ifndef __NM_REMOTE_CONNECTION_PRIVATE_H__ #ifndef __NM_REMOTE_CONNECTION_PRIVATE_H__
#define __NM_REMOTE_CONNECTION_PRIVATE_H__ #define __NM_REMOTE_CONNECTION_PRIVATE_H__
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -6,7 +6,7 @@
#ifndef __NM_CONNECTION_PRIVATE_H__ #ifndef __NM_CONNECTION_PRIVATE_H__
#define __NM_CONNECTION_PRIVATE_H__ #define __NM_CONNECTION_PRIVATE_H__
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -7,7 +7,7 @@
#ifndef __NM_PROPERTY_COMPARE_H__ #ifndef __NM_PROPERTY_COMPARE_H__
#define __NM_PROPERTY_COMPARE_H__ #define __NM_PROPERTY_COMPARE_H__
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -6,7 +6,7 @@
#ifndef __NM_SETTING_PRIVATE_H__ #ifndef __NM_SETTING_PRIVATE_H__
#define __NM_SETTING_PRIVATE_H__ #define __NM_SETTING_PRIVATE_H__
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -6,7 +6,7 @@
#ifndef __NM_TEAM_UITLS_H__ #ifndef __NM_TEAM_UITLS_H__
#define __NM_TEAM_UITLS_H__ #define __NM_TEAM_UITLS_H__
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -6,7 +6,7 @@
#ifndef __NM_UTILS_PRIVATE_H__ #ifndef __NM_UTILS_PRIVATE_H__
#define __NM_UTILS_PRIVATE_H__ #define __NM_UTILS_PRIVATE_H__
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -16,7 +16,7 @@
* statically against libnm-core. This basically means libnm-core, libnm, NetworkManager * statically against libnm-core. This basically means libnm-core, libnm, NetworkManager
* and some test programs. * and some test programs.
**/ **/
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_INTERNAL) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_INTERNAL)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -7,7 +7,7 @@
#ifndef __NM_KEYFILE_INTERNAL_H__ #ifndef __NM_KEYFILE_INTERNAL_H__
#define __NM_KEYFILE_INTERNAL_H__ #define __NM_KEYFILE_INTERNAL_H__
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_INTERNAL) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_INTERNAL)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -6,7 +6,7 @@
#ifndef __NM_KEYFILE_UTILS_H__ #ifndef __NM_KEYFILE_UTILS_H__
#define __NM_KEYFILE_UTILS_H__ #define __NM_KEYFILE_UTILS_H__
#if !((NETWORKMANAGER_COMPILATION) &NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_INTERNAL) #if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_INTERNAL)
#error Cannot use this header. #error Cannot use this header.
#endif #endif

View File

@@ -134,7 +134,7 @@
({ \ ({ \
gboolean _not_expired = TRUE; \ gboolean _not_expired = TRUE; \
const gint64 nmtst_wait_start_us = g_get_monotonic_time(); \ const gint64 nmtst_wait_start_us = g_get_monotonic_time(); \
const gint64 nmtst_wait_duration_us = (max_wait_ms) *1000L; \ const gint64 nmtst_wait_duration_us = (max_wait_ms) * 1000L; \
const gint64 nmtst_wait_end_us = nmtst_wait_start_us + nmtst_wait_duration_us; \ const gint64 nmtst_wait_end_us = nmtst_wait_start_us + nmtst_wait_duration_us; \
gint64 _nmtst_wait_remaining_us = nmtst_wait_duration_us; \ gint64 _nmtst_wait_remaining_us = nmtst_wait_duration_us; \
int _nmtst_wait_iteration = 0; \ int _nmtst_wait_iteration = 0; \

View File

@@ -130,7 +130,7 @@ struct qrcodegen_Segment {
// as a compile-time constant. For example, 'uint8_t buffer[qrcodegen_BUFFER_LEN_FOR_VERSION(25)];' // as a compile-time constant. For example, 'uint8_t buffer[qrcodegen_BUFFER_LEN_FOR_VERSION(25)];'
// can store any single QR Code from version 1 to 25 (inclusive). The result fits in an int (or int16). // can store any single QR Code from version 1 to 25 (inclusive). The result fits in an int (or int16).
// Requires qrcodegen_VERSION_MIN <= n <= qrcodegen_VERSION_MAX. // Requires qrcodegen_VERSION_MIN <= n <= qrcodegen_VERSION_MAX.
#define qrcodegen_BUFFER_LEN_FOR_VERSION(n) ((((n) *4 + 17) * ((n) *4 + 17) + 7) / 8 + 1) #define qrcodegen_BUFFER_LEN_FOR_VERSION(n) ((((n) * 4 + 17) * ((n) * 4 + 17) + 7) / 8 + 1)
// The worst-case number of bytes needed to store one QR Code, up to and including // The worst-case number of bytes needed to store one QR Code, up to and including
// version 40. This value equals 3918, which is just under 4 kilobytes. // version 40. This value equals 3918, which is just under 4 kilobytes.

View File

@@ -1016,7 +1016,7 @@ nmc_readline_echo(const NmcConfig *nmc_config, gboolean echo_on, const char *pro
saved_history = history_get_history_state(); saved_history = history_get_history_state();
history_set_history_state(&passwd_history); history_set_history_state(&passwd_history);
#else #else
start = where_history(); start = where_history();
#endif #endif
/* stifling history is important as it tells readline to /* stifling history is important as it tells readline to
* not store anything, otherwise sensitive data could be * not store anything, otherwise sensitive data could be