mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-11-13 07:17:28 +00:00
[common] use variable-relative sizeof where possible
This commit is contained in:
committed by
Geoffrey McRae
parent
982b4e6625
commit
1c5620ba25
@@ -171,8 +171,7 @@ bool ivshmemOpenDev(struct IVSHMEM * dev, const char * shmDevice)
|
||||
return false;
|
||||
}
|
||||
|
||||
struct IVSHMEMInfo * info =
|
||||
(struct IVSHMEMInfo *)malloc(sizeof(struct IVSHMEMInfo));
|
||||
struct IVSHMEMInfo * info = (struct IVSHMEMInfo *)malloc(sizeof(*info));
|
||||
info->size = devSize;
|
||||
info->devFd = devFd;
|
||||
info->hasDMA = hasDMA;
|
||||
|
||||
Reference in New Issue
Block a user