]> git.meshlink.io Git - catta/commitdiff
move assert check before access
authorLennart Poettering <lennart@poettering.net>
Sun, 4 Feb 2007 17:12:18 +0000 (17:12 +0000)
committerLennart Poettering <lennart@poettering.net>
Sun, 4 Feb 2007 17:12:18 +0000 (17:12 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1383 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/iface-pfroute.c

index 035e2672af90adcd223e5d7781363c39c8af3014..f96bfc2924f827322d1ac090586fc6e4fb441c03 100644 (file)
@@ -262,10 +262,11 @@ static void socket_event(AvahiWatch *w, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent
 
 int avahi_interface_monitor_init_osdep(AvahiInterfaceMonitor *m) {
     int fd = -1;
-    m->osdep.pfroute = NULL;
 
     assert(m);
 
+    m->osdep.pfroute = NULL;
+
     if ((fd = socket(PF_ROUTE, SOCK_RAW, AF_UNSPEC)) < 0) {
         avahi_log_error(__FILE__": socket(PF_ROUTE): %s", strerror(errno));
         goto fail;