aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2010-09-08 10:44:23 -0400
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:27 +0200
commit9b5f99c37b4c48406eda5af2e58eb57b9a33c164 (patch)
treedadd3207d26eb939f61a22d9b21c04a88a250e01 /nx-X11/lib/X11
parent13fe4d4758c111a659c97356c7faf8bddeef336c (diff)
downloadnx-libs-9b5f99c37b4c48406eda5af2e58eb57b9a33c164.tar.gz
nx-libs-9b5f99c37b4c48406eda5af2e58eb57b9a33c164.tar.bz2
nx-libs-9b5f99c37b4c48406eda5af2e58eb57b9a33c164.zip
Zero buffer data in BufAlloc()
Inspired by a pattern in NoMachine's NX. Consistently zeroed buffers compress better with ssh and friends. Note that you'll need to rebuild all your protocol libraries to take advantage of this. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11')
-rw-r--r--nx-X11/lib/X11/Xlibint.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/nx-X11/lib/X11/Xlibint.h b/nx-X11/lib/X11/Xlibint.h
index e3d63f29a..ead343eae 100644
--- a/nx-X11/lib/X11/Xlibint.h
+++ b/nx-X11/lib/X11/Xlibint.h
@@ -617,7 +617,7 @@ extern void _XFlushGCCache(Display *dpy, GC gc);
if (dpy->bufptr + (n) > dpy->bufmax) \
_XFlush (dpy); \
ptr = (type) dpy->bufptr; \
- (void)ptr; \
+ memset(ptr, '\0', n); \
dpy->bufptr += (n);
#define Data16(dpy, data, len) Data((dpy), (_Xconst char *)(data), (len))