aboutsummaryrefslogtreecommitdiffstats
path: root/src/fns.c
diff options
context:
space:
mode:
authorPaul Eggert2012-09-11 15:59:50 -0700
committerPaul Eggert2012-09-11 15:59:50 -0700
commitae1d87e24edc6a5fa4bc291e1b2ea20d7853127c (patch)
tree200f48e41018df77fb2f63e55e0d22c829968ebe /src/fns.c
parent5779a1dc62593be8294edaecfecca4359be9ab4e (diff)
downloademacs-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/fns.c')
-rw-r--r--src/fns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fns.c b/src/fns.c
index 95450c5e911..91dc6639150 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -3680,7 +3680,7 @@ copy_hash_table (struct Lisp_Hash_Table *h1)
3680 3680
3681 h2 = allocate_hash_table (); 3681 h2 = allocate_hash_table ();
3682 next = h2->header.next.vector; 3682 next = h2->header.next.vector;
3683 memcpy (h2, h1, sizeof *h2); 3683 *h2 = *h1;
3684 h2->header.next.vector = next; 3684 h2->header.next.vector = next;
3685 h2->key_and_value = Fcopy_sequence (h1->key_and_value); 3685 h2->key_and_value = Fcopy_sequence (h1->key_and_value);
3686 h2->hash = Fcopy_sequence (h1->hash); 3686 h2->hash = Fcopy_sequence (h1->hash);