summary refs log tree commit diff
path: root/src/settings/nm-inotify-helper.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2014-07-06 02:16:10 +0200
committerMichael Biebl <biebl@debian.org>2014-07-06 02:16:10 +0200
commit33491bc4279481db8ae47213e34a6d695a0e8830 (patch)
tree097d2b0fdff3fae6885381ae5e57a182cd8cbbba /src/settings/nm-inotify-helper.c
parent59c3714a494c3b3765657c0551ad82842d98a7d2 (diff)
Imported Upstream version 0.9.10.0 upstream/0.9.10.0
Diffstat (limited to 'src/settings/nm-inotify-helper.c')
-rw-r--r--src/settings/nm-inotify-helper.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/settings/nm-inotify-helper.c b/src/settings/nm-inotify-helper.c
index 2391d993..7231b57e 100644
--- a/src/settings/nm-inotify-helper.c
+++ b/src/settings/nm-inotify-helper.c
@@ -23,7 +23,6 @@
 #include <sys/inotify.h>
 #include <glib.h>
 
-#include "nm-marshal.h"
 #include "nm-inotify-helper.h"
 #include "nm-logging.h"
 
@@ -133,13 +132,6 @@ init_inotify (NMInotifyHelper *self)
 
 	/* Watch the inotify descriptor for file/directory change events */
 	channel = g_io_channel_unix_new (priv->ifd);
-	if (!channel) {
-		nm_log_warn (LOGD_SETTINGS, "couldn't create new GIOChannel");
-		close (priv->ifd);
-		priv->ifd = -1;
-		return FALSE;
-	}
-
 	g_io_channel_set_flags (channel, G_IO_FLAG_NONBLOCK, NULL);
 	g_io_channel_set_encoding (channel, NULL, NULL); 
 
@@ -158,11 +150,9 @@ nm_inotify_helper_get (void)
 
 	if (!singleton) {
 		singleton = (NMInotifyHelper *) g_object_new (NM_TYPE_INOTIFY_HELPER, NULL);
-		if (!singleton)
-			return NULL;
 
 		if (!init_inotify (singleton)) {
-			g_object_unref (singleton);
+			g_clear_object (&singleton);
 			return NULL;
 		}
 	} else
@@ -209,8 +199,7 @@ nm_inotify_helper_class_init (NMInotifyHelperClass *klass)
 		              G_OBJECT_CLASS_TYPE (object_class),
 		              G_SIGNAL_RUN_LAST,
 		              G_STRUCT_OFFSET (NMInotifyHelperClass, event),
-		              NULL, NULL,
-		              _nm_marshal_VOID__POINTER_STRING,
+		              NULL, NULL, NULL,
 		              G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_STRING);
 }