[X2Go-Commits] [nx-libs] 02/13: nx-X11/programs/Xserver/hw/nxagent/Screen.c: let intersect() accept NULL pointers in case we're only interested in the boolean return value.
git-admin at x2go.org
git-admin at x2go.org
Fri May 4 16:06:05 CEST 2018
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x-rpm-debug
in repository nx-libs.
commit 83d0a75cb33c13de055ca7a2a5e5234b8a6643a2
Author: Mihai Moldovan <ionic at ionic.de>
Date: Mon Mar 19 06:18:51 2018 +0100
nx-X11/programs/Xserver/hw/nxagent/Screen.c: let intersect() accept NULL pointers in case we're only interested in the boolean return value.
---
nx-X11/programs/Xserver/hw/nxagent/Screen.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index 793d799..fb33be7 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -3670,13 +3670,25 @@ static Bool intersect(int ax1, int ay1, unsigned int aw, unsigned int ah,
return FALSE;
}
- *x = ix;
- *y = iy;
- *w = iw;
- *h = ih;
+
+ if (x) {
+ *x = ix;
+ }
+
+ if (y) {
+ *y = iy;
+ }
+
+ if (w) {
+ *w = iw;
+ }
+
+ if (h) {
+ *h = ih;
+ }
#ifdef DEBUG
- fprintf(stderr, "intersect: intersection is: ([%d],[%d]) [ %d x %d ]\n", *x, *y, *w, *h);
+ fprintf(stderr, "intersect: intersection is: ([%d],[%d]) [ %d x %d ]\n", (x) ? *(x) : (-1), (y) ? (*y) : (-1), (w) ? (*w) : (-1), (h) ? (*h) : (-1));
#endif
return TRUE;
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list