Skip to content

Commit

Permalink
Remove extraneous call of vm_getbyvmid during pause event
Browse files Browse the repository at this point in the history
The vm is already being assigned by a call in the if-condition.
  • Loading branch information
voutilad committed Apr 1, 2021
1 parent 43140f0 commit e06d60d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions usr.sbin/vmd/vmm.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: vmm.c,v 1.98 2021/03/29 23:37:01 dv Exp $ */
/* $OpenBSD: vmm.c,v 1.99 2021/04/01 11:05:47 dv Exp $ */

/*
* Copyright (c) 2015 Mike Larkin <[email protected]>
Expand Down Expand Up @@ -273,7 +273,6 @@ vmm_dispatch_parent(int fd, struct privsep_proc *p, struct imsg *imsg)
IMSG_SIZE_CHECK(imsg, &vid);
memcpy(&vid, imsg->data, sizeof(vid));
id = vid.vid_id;
vm = vm_getbyvmid(id);
if ((vm = vm_getbyvmid(id)) == NULL) {
res = ENOENT;
cmd = IMSG_VMDOP_PAUSE_VM_RESPONSE;
Expand Down

0 comments on commit e06d60d

Please sign in to comment.