summaryrefslogtreecommitdiffstats
path: root/source/n/rdist/rdist-6.1.5-03.hardlink.diff
blob: 5eeebc1cc232142127b2ed4968936a3d9fee42b3 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- rdist-6.1.5/src/client.c.hardlink	Thu Jun  3 13:56:31 1999
+++ rdist-6.1.5/src/client.c	Thu Jun  3 14:00:06 1999
@@ -348,7 +348,7 @@
 		lp->target = strdup(Tdest);
 	else
 		lp->target = NULL;
-	if (!lp->pathname || !lp->src || !(Tdest && lp->target))
+	if (!lp->pathname || !lp->src || (Tdest && !lp->target))
 		fatalerr("Cannot malloc memory in linkinfo.");
 
 	return((struct linkbuf *) NULL);
@@ -370,7 +370,7 @@
 	       "sendhardlink: rname='%s' pathname='%s' src='%s' target='%s'\n",
 		 rname, lp->pathname, lp->src, lp->target);
 		 
-	if (*lp->target == CNULL)
+	if (lp->target == NULL || *lp->target == CNULL)
 		(void) sendcmd(C_RECVHARDLINK, "%o %s %s", 
 			       opts, lp->pathname, rname);
 	else {