diff options
| author | Dmitry Antipov | 2013-08-15 09:23:40 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-08-15 09:23:40 +0400 |
| commit | 9c25330708e49ddaeb71f16a65cdc1b51be2a27d (patch) | |
| tree | 0d03865094f5189816fccdff2248a22761713a50 /src/image.c | |
| parent | 05e64f9f63f98108bb04f8ab45343e507862d8f4 (diff) | |
| download | emacs-9c25330708e49ddaeb71f16a65cdc1b51be2a27d.tar.gz emacs-9c25330708e49ddaeb71f16a65cdc1b51be2a27d.zip | |
* term.c (get_named_tty, create_tty_output, tty_free_frame_resources)
(tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort.
* image.c (make_image_cache): For struct image_cache, prefer xmalloc
to xzalloc and so avoid redundant call to memset.
* xterm.c (x_term_init): Avoid unnecessary initializations of dpyinfo
members because it is allocated with xzalloc and so already zeroed.
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/image.c b/src/image.c index f71ba211d44..8d969a6f9c6 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -1360,14 +1360,12 @@ static void cache_image (struct frame *f, struct image *img); | |||
| 1360 | struct image_cache * | 1360 | struct image_cache * |
| 1361 | make_image_cache (void) | 1361 | make_image_cache (void) |
| 1362 | { | 1362 | { |
| 1363 | struct image_cache *c = xzalloc (sizeof *c); | 1363 | struct image_cache *c = xmalloc (sizeof *c); |
| 1364 | int size; | 1364 | |
| 1365 | 1365 | c->size = 50; | |
| 1366 | size = 50; | 1366 | c->used = c->refcount = 0; |
| 1367 | c->images = xmalloc (size * sizeof *c->images); | 1367 | c->images = xmalloc (c->size * sizeof *c->images); |
| 1368 | c->size = size; | 1368 | c->buckets = xzalloc (IMAGE_CACHE_BUCKETS_SIZE * sizeof *c->buckets); |
| 1369 | size = IMAGE_CACHE_BUCKETS_SIZE * sizeof *c->buckets; | ||
| 1370 | c->buckets = xzalloc (size); | ||
| 1371 | return c; | 1369 | return c; |
| 1372 | } | 1370 | } |
| 1373 | 1371 | ||