diff options
author | Adam Jackson <ajax@redhat.com> | 2010-09-08 10:44:23 -0400 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-09-14 00:42:07 -0700 |
commit | 10dd881e7818be9074da4ab3a68577adcdaf71d2 (patch) | |
tree | 3f3b964c8ace022920efb470c06f93887866ce07 | |
parent | da099f0d2015831ea5f4a5d0740ed962aa4d5d8b (diff) |
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>
-rw-r--r-- | include/X11/Xlibint.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h index e765cc91..77f0dc79 100644 --- a/include/X11/Xlibint.h +++ b/include/X11/Xlibint.h @@ -626,7 +626,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); #ifdef WORD64 |