slackware-current/source/n/rdist/rdist-6.1.5-03.hardlink.diff
Patrick J Volkerding b76270bf9e Slackware 13.1
Wed May 19 08:58:23 UTC 2010
Slackware 13.1 x86_64 stable is released!
Lots of thanks are due -- see the RELEASE_NOTES and the rest of the
ChangeLog for credits.  The ISOs are on their way to replication,
a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD.
We are taking pre-orders now at store.slackware.com, and offering
a discount if you sign up for a subscription.  Consider picking up
a copy to help support the project.  Thanks again to the Slackware
community for testing, contributing, and generally holding us to a
high level of quality.  :-)
Enjoy!
2018-05-31 22:43:05 +02:00

20 lines
721 B
Diff

--- 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 {