diff --git a/src/core/nm-types.h b/src/core/nm-types.h index 18f44ca94..104a2f4b0 100644 --- a/src/core/nm-types.h +++ b/src/core/nm-types.h @@ -6,7 +6,7 @@ #ifndef __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. #endif diff --git a/src/core/supplicant/nm-supplicant-types.h b/src/core/supplicant/nm-supplicant-types.h index 1f04c12b8..870a53c31 100644 --- a/src/core/supplicant/nm-supplicant-types.h +++ b/src/core/supplicant/nm-supplicant-types.h @@ -55,9 +55,9 @@ typedef enum { _NM_SUPPL_CAP_TYPE_NUM, } NMSupplCapType; -#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_MASK(type) ((NMSupplCapMask) (3llu << ((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_MASK(type) ((NMSupplCapMask) (3llu << ((type) * 2u))) typedef enum { NM_SUPPL_CAP_MASK_NONE = 0, diff --git a/src/libnm-client-impl/nm-dbus-helpers.h b/src/libnm-client-impl/nm-dbus-helpers.h index 5a6b2d629..96c8ee75f 100644 --- a/src/libnm-client-impl/nm-dbus-helpers.h +++ b/src/libnm-client-impl/nm-dbus-helpers.h @@ -6,7 +6,7 @@ #ifndef __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. #endif diff --git a/src/libnm-client-impl/nm-dhcp4-config.h b/src/libnm-client-impl/nm-dhcp4-config.h index ab400393c..b3130f5d8 100644 --- a/src/libnm-client-impl/nm-dhcp4-config.h +++ b/src/libnm-client-impl/nm-dhcp4-config.h @@ -6,7 +6,7 @@ #ifndef __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. #endif diff --git a/src/libnm-client-impl/nm-dhcp6-config.h b/src/libnm-client-impl/nm-dhcp6-config.h index 49334275e..e42e98262 100644 --- a/src/libnm-client-impl/nm-dhcp6-config.h +++ b/src/libnm-client-impl/nm-dhcp6-config.h @@ -6,7 +6,7 @@ #ifndef __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. #endif diff --git a/src/libnm-client-impl/nm-dns-manager.h b/src/libnm-client-impl/nm-dns-manager.h index 20a5286ec..cac922ad8 100644 --- a/src/libnm-client-impl/nm-dns-manager.h +++ b/src/libnm-client-impl/nm-dns-manager.h @@ -6,7 +6,7 @@ #ifndef __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. #endif diff --git a/src/libnm-client-impl/nm-ip4-config.h b/src/libnm-client-impl/nm-ip4-config.h index 3c4b128e7..bfd21b647 100644 --- a/src/libnm-client-impl/nm-ip4-config.h +++ b/src/libnm-client-impl/nm-ip4-config.h @@ -7,7 +7,7 @@ #ifndef __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. #endif diff --git a/src/libnm-client-impl/nm-ip6-config.h b/src/libnm-client-impl/nm-ip6-config.h index b44cd34ba..7682004ad 100644 --- a/src/libnm-client-impl/nm-ip6-config.h +++ b/src/libnm-client-impl/nm-ip6-config.h @@ -7,7 +7,7 @@ #ifndef __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. #endif diff --git a/src/libnm-client-impl/nm-object-private.h b/src/libnm-client-impl/nm-object-private.h index 11afc6397..34dad1883 100644 --- a/src/libnm-client-impl/nm-object-private.h +++ b/src/libnm-client-impl/nm-object-private.h @@ -6,7 +6,7 @@ #ifndef __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. #endif diff --git a/src/libnm-client-impl/nm-remote-connection-private.h b/src/libnm-client-impl/nm-remote-connection-private.h index f08693470..a0493bfcd 100644 --- a/src/libnm-client-impl/nm-remote-connection-private.h +++ b/src/libnm-client-impl/nm-remote-connection-private.h @@ -6,7 +6,7 @@ #ifndef __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. #endif diff --git a/src/libnm-core-impl/nm-connection-private.h b/src/libnm-core-impl/nm-connection-private.h index 08abb9a49..3b2c36fdf 100644 --- a/src/libnm-core-impl/nm-connection-private.h +++ b/src/libnm-core-impl/nm-connection-private.h @@ -6,7 +6,7 @@ #ifndef __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. #endif diff --git a/src/libnm-core-impl/nm-property-compare.h b/src/libnm-core-impl/nm-property-compare.h index 2400bc424..7444400d7 100644 --- a/src/libnm-core-impl/nm-property-compare.h +++ b/src/libnm-core-impl/nm-property-compare.h @@ -7,7 +7,7 @@ #ifndef __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. #endif diff --git a/src/libnm-core-impl/nm-setting-private.h b/src/libnm-core-impl/nm-setting-private.h index 8964f6c79..943348fb7 100644 --- a/src/libnm-core-impl/nm-setting-private.h +++ b/src/libnm-core-impl/nm-setting-private.h @@ -6,7 +6,7 @@ #ifndef __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. #endif diff --git a/src/libnm-core-impl/nm-team-utils.h b/src/libnm-core-impl/nm-team-utils.h index 722fa1882..0210cb263 100644 --- a/src/libnm-core-impl/nm-team-utils.h +++ b/src/libnm-core-impl/nm-team-utils.h @@ -6,7 +6,7 @@ #ifndef __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. #endif diff --git a/src/libnm-core-impl/nm-utils-private.h b/src/libnm-core-impl/nm-utils-private.h index e2e1aff78..1521c0f92 100644 --- a/src/libnm-core-impl/nm-utils-private.h +++ b/src/libnm-core-impl/nm-utils-private.h @@ -6,7 +6,7 @@ #ifndef __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. #endif diff --git a/src/libnm-core-intern/nm-core-internal.h b/src/libnm-core-intern/nm-core-internal.h index 7ed664494..2172ed0b9 100644 --- a/src/libnm-core-intern/nm-core-internal.h +++ b/src/libnm-core-intern/nm-core-internal.h @@ -16,7 +16,7 @@ * statically against libnm-core. This basically means libnm-core, libnm, NetworkManager * 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. #endif diff --git a/src/libnm-core-intern/nm-keyfile-internal.h b/src/libnm-core-intern/nm-keyfile-internal.h index ecbcedb2a..7419cc429 100644 --- a/src/libnm-core-intern/nm-keyfile-internal.h +++ b/src/libnm-core-intern/nm-keyfile-internal.h @@ -7,7 +7,7 @@ #ifndef __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. #endif diff --git a/src/libnm-core-intern/nm-keyfile-utils.h b/src/libnm-core-intern/nm-keyfile-utils.h index 08f169ac9..b7758c053 100644 --- a/src/libnm-core-intern/nm-keyfile-utils.h +++ b/src/libnm-core-intern/nm-keyfile-utils.h @@ -6,7 +6,7 @@ #ifndef __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. #endif diff --git a/src/libnm-glib-aux/nm-test-utils.h b/src/libnm-glib-aux/nm-test-utils.h index ca93d649e..ec3a24665 100644 --- a/src/libnm-glib-aux/nm-test-utils.h +++ b/src/libnm-glib-aux/nm-test-utils.h @@ -134,7 +134,7 @@ ({ \ gboolean _not_expired = TRUE; \ 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; \ gint64 _nmtst_wait_remaining_us = nmtst_wait_duration_us; \ int _nmtst_wait_iteration = 0; \ diff --git a/src/libnmc-base/qrcodegen.h b/src/libnmc-base/qrcodegen.h index 46d986a38..26c842cdc 100644 --- a/src/libnmc-base/qrcodegen.h +++ b/src/libnmc-base/qrcodegen.h @@ -130,7 +130,7 @@ struct qrcodegen_Segment { // 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). // 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 // version 40. This value equals 3918, which is just under 4 kilobytes. diff --git a/src/nmcli/common.c b/src/nmcli/common.c index 518faa2f7..04d2ebf94 100644 --- a/src/nmcli/common.c +++ b/src/nmcli/common.c @@ -1016,7 +1016,7 @@ nmc_readline_echo(const NmcConfig *nmc_config, gboolean echo_on, const char *pro saved_history = history_get_history_state(); history_set_history_state(&passwd_history); #else - start = where_history(); + start = where_history(); #endif /* stifling history is important as it tells readline to * not store anything, otherwise sensitive data could be