libsa: dereferencing type-punned pointer in cd9660

The warning is given by gcc build, but it is good to fix anyhow.
use bcopy instead of direct assignment.
This commit is contained in:
Toomas Soome 2018-08-02 06:22:10 +00:00
parent b59e9cd1c0
commit 17e2c2661b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=337065
2 changed files with 2 additions and 2 deletions

View File

@ -304,7 +304,7 @@ cd9660_open(const char *path, struct open_file *f)
if (isonum_723(vd->logical_block_size) != ISO_DEFAULT_BLOCK_SIZE)
goto out;
rec = *(struct iso_directory_record *) vd->root_directory_record;
bcopy(vd->root_directory_record, &rec, sizeof(rec));
if (*path == '/') path++; /* eat leading '/' */
first = 1;

View File

@ -241,7 +241,7 @@ cd9660_lookup(const char *path)
break;
}
rec = *(struct iso_directory_record *) vd->root_directory_record;
bcopy(vd->root_directory_record, &rec, sizeof(rec));
if (*path == '/') path++; /* eat leading '/' */
first = 1;