aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2018-07-07 08:04:51 +0200
committerMihai Moldovan <ionic@ionic.de>2018-07-07 08:05:24 +0200
commit992673157077080f3d5637c7f666e43639181a91 (patch)
tree4fea0a4dd680f6e9db068ec89ec575c0e8cfb765 /nx-X11/lib
parent15f69488dc712ac93714d17d2c4e88e09de187df (diff)
downloadnx-libs-992673157077080f3d5637c7f666e43639181a91.tar.gz
nx-libs-992673157077080f3d5637c7f666e43639181a91.tar.bz2
nx-libs-992673157077080f3d5637c7f666e43639181a91.zip
misc: fix more regressions and whitespace weirdness introduced in 913fcf1a74426725f14380dd5b34286a21c37ab7.
Diffstat (limited to 'nx-X11/lib')
-rw-r--r--nx-X11/lib/include/xtrans/Xtrans.c10
-rw-r--r--nx-X11/lib/include/xtrans/Xtranssock.c3
2 files changed, 8 insertions, 5 deletions
diff --git a/nx-X11/lib/include/xtrans/Xtrans.c b/nx-X11/lib/include/xtrans/Xtrans.c
index aa9646261..3665c8d78 100644
--- a/nx-X11/lib/include/xtrans/Xtrans.c
+++ b/nx-X11/lib/include/xtrans/Xtrans.c
@@ -980,17 +980,17 @@ TRANS(GetMyAddr) (XtransConnInfo ciptr, int *familyp, int *addrlenp,
{
prmsg (1,"GetMyAddr: malloc failed\n");
return -1;
- } else {
- memcpy(*addrp, ciptr->addr, ciptr->addrlen);
- free(addrp);
}
+
+ memcpy(*addrp, ciptr->addr, ciptr->addrlen);
+
return 0;
}
#endif
int
TRANS(GetPeerAddr) (XtransConnInfo ciptr, int *familyp, int *addrlenp,
- Xtransaddr **addrp)
+ Xtransaddr **addrp)
{
prmsg (2,"GetPeerAddr(%d)\n", ciptr->fd);
@@ -1003,7 +1003,9 @@ TRANS(GetPeerAddr) (XtransConnInfo ciptr, int *familyp, int *addrlenp,
prmsg (1,"GetPeerAddr: malloc failed\n");
return -1;
}
+
memcpy(*addrp, ciptr->peeraddr, ciptr->peeraddrlen);
+
return 0;
}
diff --git a/nx-X11/lib/include/xtrans/Xtranssock.c b/nx-X11/lib/include/xtrans/Xtranssock.c
index 090a325ce..47c0a0409 100644
--- a/nx-X11/lib/include/xtrans/Xtranssock.c
+++ b/nx-X11/lib/include/xtrans/Xtranssock.c
@@ -2442,7 +2442,7 @@ SocketUNIXConnectPost:
(ciptr->peeraddr = malloc(namelen)) == NULL)
{
prmsg (1,
- "SocketUNIXCreateListener: Can't allocate space for the addr\n");
+ "SocketUNIXCreateListener: Can't allocate space for the addr\n");
return TRANS_CONNECT_FAILED;
}
@@ -2454,6 +2454,7 @@ SocketUNIXConnectPost:
ciptr->peeraddrlen = namelen;
memcpy (ciptr->addr, &sockname, ciptr->addrlen);
memcpy (ciptr->peeraddr, &sockname, ciptr->peeraddrlen);
+
return 0;
}