Use calloc instead of xmalloc.

This commit is contained in:
Tim Waugh 2015-02-24 16:43:38 +00:00
parent 86c83bb5cb
commit ecb76618ef
2 changed files with 5 additions and 4 deletions

View File

@ -23,9 +23,9 @@ diff -up tigervnc-1.4.2/unix/xserver/hw/vnc/xvnc.cc.xserver117 tigervnc-1.4.2/un
- ppix = (Pixel *)xalloc(entries * sizeof(Pixel));
- prgb = (xrgb *)xalloc(entries * sizeof(xrgb));
- defs = (xColorItem *)xalloc(entries * sizeof(xColorItem));
+ ppix = (Pixel *)malloc(entries * sizeof(Pixel));
+ prgb = (xrgb *)malloc(entries * sizeof(xrgb));
+ defs = (xColorItem *)malloc(entries * sizeof(xColorItem));
+ ppix = (Pixel *)calloc(entries, sizeof(Pixel));
+ prgb = (xrgb *)calloc(entries, sizeof(xrgb));
+ defs = (xColorItem *)calloc(entries, sizeof(xColorItem));
for (i = 0; i < entries; i++) ppix[i] = i;
/* XXX truecolor */

View File

@ -1,6 +1,6 @@
Name: tigervnc
Version: 1.4.2
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A TigerVNC remote display system
%global _hardened_build 1
@ -353,6 +353,7 @@ fi
%changelog
* Tue Feb 24 2015 Tim Waugh <twaugh@redhat.com> - 1.4.2-3
- Use calloc instead of xmalloc.
- Removed unnecessary configure flags.
* Wed Feb 18 2015 Rex Dieter <rdieter@fedoraproject.org> 1.4.2-2