From c3740a6a4d6324374384f5efda076986ced453b4 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Tue, 19 Nov 2013 17:11:35 +0100 Subject: [PATCH] In vm_new_vm(), use the proper calloc() argument order .. and don't derive 1 from the unrelated sizeof(char). Fixes the scan-anaylzer "API violation" warning: Result of 'calloc' is converted to a pointer of type 'vm_t', which is incompatible with sizeof operand type 'char' --- src/vm/vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vm/vm.c b/src/vm/vm.c index 5143ed1..9feadcd 100644 --- a/src/vm/vm.c +++ b/src/vm/vm.c @@ -263,7 +263,7 @@ static int ifoOpenNewVTSI(vm_t *vm, dvd_reader_t *dvd, int vtsN) { /* Initialisation & Destruction */ vm_t* vm_new_vm() { - return (vm_t*)calloc(sizeof(vm_t), sizeof(char)); + return (vm_t*)calloc(1, sizeof(vm_t)); } void vm_free_vm(vm_t *vm) { -- 1.8.4.2