mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-07 21:03:10 +00:00
Remove all usages of bzero()
As recommended by modern C practice, we should just be using memset(). Signed-off-by: Dan McGee <dpmcgee@gmail.com>
This commit is contained in:
parent
08c514ee85
commit
3f303d6014
@ -267,7 +267,7 @@ SpiceCoreInterface *basic_event_loop_init(void)
|
||||
{
|
||||
ring_init(&watches);
|
||||
ring_init(&timers);
|
||||
bzero(&core, sizeof(core));
|
||||
memset(&core, 0, sizeof(core));
|
||||
core.base.major_version = SPICE_INTERFACE_CORE_MAJOR;
|
||||
core.base.minor_version = SPICE_INTERFACE_CORE_MINOR; // anything less then 3 and channel_event isn't called
|
||||
core.timer_add = timer_add;
|
||||
|
||||
@ -339,7 +339,7 @@ static void set_mm_time(QXLInstance *qin, uint32_t mm_time)
|
||||
|
||||
static void get_init_info(QXLInstance *qin, QXLDevInitInfo *info)
|
||||
{
|
||||
bzero(info, sizeof(*info));
|
||||
memset(info, 0, sizeof(*info));
|
||||
info->num_memslots = 1;
|
||||
info->num_memslots_groups = 1;
|
||||
info->memslot_id_bits = 1;
|
||||
@ -644,8 +644,8 @@ SpiceServer* test_init(SpiceCoreInterface *core)
|
||||
spice_server_init(server, core);
|
||||
|
||||
path_init(&path, 0, angle_parts);
|
||||
bzero(primary_surface, sizeof(primary_surface));
|
||||
bzero(secondary_surface, sizeof(secondary_surface));
|
||||
memset(primary_surface, 0, sizeof(primary_surface));
|
||||
memset(secondary_surface, 0, sizeof(secondary_surface));
|
||||
has_secondary = 0;
|
||||
wakeup_timer = core->timer_add(do_wakeup, NULL);
|
||||
return server;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
#include <strings.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <spice.h>
|
||||
|
||||
@ -43,7 +43,7 @@ int main(void)
|
||||
SpiceServer *server = spice_server_new();
|
||||
SpiceCoreInterface core;
|
||||
|
||||
bzero(&core, sizeof(core));
|
||||
memset(&core, 0, sizeof(core));
|
||||
core.base.major_version = SPICE_INTERFACE_CORE_MAJOR;
|
||||
core.timer_add = timer_add;
|
||||
core.timer_start = timer_start;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user