Combine logic.
authorfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Mon, 14 Aug 2006 15:46:30 +0000 (15:46 +0000)
committerfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Mon, 14 Aug 2006 15:46:30 +0000 (15:46 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@687 959494ce-11ee-0310-bf91-de5d638817bd

daemon/fnet-dc.c

index a20aa05..360fe1f 100644 (file)
@@ -3073,13 +3073,10 @@ static void hubdestroy(struct fnetnode *fn)
     struct qcommand *qcmd;
     
     hub = (struct dchub *)fn->data;
-    if(fn->sk != NULL)
+    if((fn->sk != NULL) && (fn->sk->data == fn))
     {
-       if(fn->sk->data == fn)
-       {
-           fn->sk->data = NULL;
-           putfnetnode(fn);
-       }
+       fn->sk->data = NULL;
+       putfnetnode(fn);
     }
     if(hub == NULL)
        return;