mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-22 13:37:10 +00:00
dm: cleanup assert in core.c
- check input by condition check, instead of assert. - remove redundant header file including for some files. Tracked-On: #3252 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
This commit is contained in:
parent
012ec75163
commit
842da0ac1e
@ -28,7 +28,6 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <openssl/rand.h>
|
||||
|
||||
#include "types.h"
|
||||
|
@ -2291,7 +2291,8 @@ pci_emul_cfgdata(struct vmctx *ctx, int vcpu, int in, int port, int bytes,
|
||||
{
|
||||
int coff;
|
||||
|
||||
assert(bytes == 1 || bytes == 2 || bytes == 4);
|
||||
if ((bytes != 1) && (bytes != 2) && (bytes != 4))
|
||||
return -1;
|
||||
|
||||
coff = cfgoff + (port - CONF1_DATA_PORT);
|
||||
if (cfgenable) {
|
||||
|
@ -24,7 +24,6 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "vmmapi.h"
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include <stdbool.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "vmmapi.h"
|
||||
#include "tpm_internal.h"
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "usb.h"
|
||||
#include "usbdi.h"
|
||||
|
@ -8,7 +8,6 @@
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "usb.h"
|
||||
|
@ -76,7 +76,6 @@
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
|
Loading…
Reference in New Issue
Block a user