Changeset 66a8cd6 for variable.c


Ignore:
Timestamp:
Mar 7, 2010, 10:28:24 PM (12 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, 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>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.