summaryrefslogtreecommitdiff
path: root/libnm-core/nm-setting-macsec.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-11-12 15:57:06 +0100
committerThomas Haller <thaller@redhat.com>2020-11-12 16:03:09 +0100
commita2b5e22f82d167ca22ae99e6b8054fd8460038c1 (patch)
tree6f504ff1d296e631c99ad9dde3256c05c0d48029 /libnm-core/nm-setting-macsec.c
parent2f83777054a6f811288434ee90958ce1c9128432 (diff)
downloadNetworkManager-a2b5e22f82d167ca22ae99e6b8054fd8460038c1.tar.gz
all: drop unnecessary cast for return value of g_object_new()
C casts unconditionally force the type, and as such they don't necessarily improve type safety, but rather overcome restrictions from the compiler when necessary. Casting a void pointer is unnecessary (in C), it does not make the code more readable nor more safe. In particular for g_object_new(), which is known to return a void pointer of the right type. Drop such casts. sed 's/([A-Za-z_0-9]\+ *\* *) *g_object_new/g_object_new/g' $(git grep -l g_object_new) -i ./contrib/scripts/nm-code-format-container.sh
Diffstat (limited to 'libnm-core/nm-setting-macsec.c')
-rw-r--r--libnm-core/nm-setting-macsec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm-core/nm-setting-macsec.c b/libnm-core/nm-setting-macsec.c
index 6f185a9aa5..3e825c3a86 100644
--- a/libnm-core/nm-setting-macsec.c
+++ b/libnm-core/nm-setting-macsec.c
@@ -495,7 +495,7 @@ nm_setting_macsec_init(NMSettingMacsec *self)
NMSetting *
nm_setting_macsec_new(void)
{
- return (NMSetting *) g_object_new(NM_TYPE_SETTING_MACSEC, NULL);
+ return g_object_new(NM_TYPE_SETTING_MACSEC, NULL);
}
static void