mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 04:21:24 +00:00
Avoid a memset in alloc-colors.c
* admin/alloc-colors.c (main): Simplify.
This commit is contained in:
parent
8c69ba718e
commit
ad8af430e6
1 changed files with 1 additions and 2 deletions
|
|
@ -52,7 +52,7 @@ main (int argc, char **argv)
|
|||
int opt, ncolors = 0, i;
|
||||
XColor *allocated;
|
||||
int nallocated;
|
||||
XColor color;
|
||||
XColor color = {0};
|
||||
Colormap cmap;
|
||||
|
||||
while ((opt = getopt (argc, argv, "n:")) != EOF)
|
||||
|
|
@ -76,7 +76,6 @@ main (int argc, char **argv)
|
|||
|
||||
allocated = malloc (ncolors * sizeof *allocated);
|
||||
nallocated = 0;
|
||||
memset (&color, 0, sizeof color);
|
||||
|
||||
while (nallocated < ncolors
|
||||
&& color.red < 65536)
|
||||
|
|
|
|||
Loading…
Reference in a new issue