1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

Prefer memcpy() over struct-copy.

This commit is contained in:
Markus F.X.J. Oberhumer 2009-04-19 18:44:17 +02:00
parent 4ca8569488
commit aaef4bee27
2 changed files with 2 additions and 3 deletions

View File

@ -120,7 +120,7 @@ int upx_ucl_compress ( const upx_bytep src, unsigned src_len,
ucl_compress_config_t cconf; cconf.reset();
if (cconf_parm)
cconf = cconf_parm->conf_ucl; // struct copy
memcpy(&cconf, &cconf_parm->conf_ucl, sizeof(cconf)); // cconf = cconf_parm->conf_ucl; // struct copy
ucl_uint *res = cresult->result_ucl.result;
// assume no info available - fill in worst case results

View File

@ -68,8 +68,7 @@ PackMaster::PackMaster(InputFile *f, options_t *o) :
saved_opt = o;
if (o)
{
this->local_options = *o; // struct copy
//memcpy(&this->local_options, o, sizeof(*o)); // struct copy
memcpy(&this->local_options, o, sizeof(*o)); // struct copy
opt = &this->local_options;
}
}