diff options
| author | Paul Eggert | 2012-09-11 15:59:50 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-09-11 15:59:50 -0700 |
| commit | ae1d87e24edc6a5fa4bc291e1b2ea20d7853127c (patch) | |
| tree | 200f48e41018df77fb2f63e55e0d22c829968ebe /src/image.c | |
| parent | 5779a1dc62593be8294edaecfecca4359be9ab4e (diff) | |
| download | emacs-ae1d87e24edc6a5fa4bc291e1b2ea20d7853127c.tar.gz emacs-ae1d87e24edc6a5fa4bc291e1b2ea20d7853127c.zip | |
Prefer assignment to memcpy when either will do.
* lib-src/pop.c (socket_connection) [HAVE_GETADDRINFO]:
* src/bidi.c (bidi_push_it, bidi_pop_it):
* src/fns.c (copy_hash_table):
* src/image.c (define_image_type):
* src/keyboard.c (kbd_buffer_store_event_hold):
* src/process.c (Fprocess_send_eof):
* src/xfaces.c (x_create_gc) [HAVE_NS]:
* src/xgselect.c (xg_select):
Use assignment, not memcpy, as either will do here, and assignment is
more likely to catch type errors.
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/image.c b/src/image.c index 4ec6105d72d..52598a41ab9 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -593,7 +593,7 @@ define_image_type (struct image_type *type, int loaded) | |||
| 593 | /* Make a copy of TYPE to avoid a bus error in a dumped Emacs. | 593 | /* Make a copy of TYPE to avoid a bus error in a dumped Emacs. |
| 594 | The initialized data segment is read-only. */ | 594 | The initialized data segment is read-only. */ |
| 595 | struct image_type *p = xmalloc (sizeof *p); | 595 | struct image_type *p = xmalloc (sizeof *p); |
| 596 | memcpy (p, type, sizeof *p); | 596 | *p = *type; |
| 597 | p->next = image_types; | 597 | p->next = image_types; |
| 598 | image_types = p; | 598 | image_types = p; |
| 599 | success = Qt; | 599 | success = Qt; |