Changeset 66a8cd6


Ignore:
Timestamp:
Mar 7, 2010, 10:28:24 PM (15 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10, release-1.6, release-1.7, release-1.8, release-1.9
Children:
423adcb
Parents:
46d940a
git-author:
Anders Kaseorg <andersk@mit.edu> (02/28/10 00:33:14)
git-committer:
Anders Kaseorg <andersk@mit.edu> (03/07/10 22:28:24)
Message:
Copy structs without memcpy.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Nelson Elhage <nelhage@mit.edu>
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • message.c

    ra44cd91 r66a8cd6  
    751751 
    752752  /* first save the full notice */
    753   memcpy(&(m->notice), n, sizeof(ZNotice_t));
     753  m->notice = *n;
    754754
    755755  /* a little gross, we'll replace \r's with ' ' for now */
  • messagelist.c

    r5e5f08f r66a8cd6  
    8585
    8686  /* copy the new list to the old list */
    87   memcpy(&(ml->list), &newlist, sizeof(owl_list));
     87  ml->list = newlist;
    8888
    8989  return(0);
  • variable.c

    rbf7aa1d r66a8cd6  
    466466  for (var = variables_to_init; var->name != NULL; var++) {
    467467    cur = owl_malloc(sizeof(owl_variable));
    468     memcpy(cur, var, sizeof(owl_variable));
     468    *cur = *var;
    469469    switch (cur->type) {
    470470    case OWL_VARIABLE_OTHER:
Note: See TracChangeset for help on using the changeset viewer.