• M
    Reset the whole stack in testutils · f4c09b91
    Martin Kletzander 提交于
    The memset() was resetting only 30 bytes in the array (size of the
    array), but it is array of pointers.  Since it is a static array,
    let's just reset it by its size.
    
    Found by gcc-7.1:
    
      testutils.c: In function 'virTestRun':
      testutils.c:243:13: error: 'memset' used with length equal to number
      of elements without multiplication by element size [-Werror=memset-elt-size]
        memset(testAllocStack, 0, ARRAY_CARDINALITY(testAllocStack));
        ^~~~~~
    Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
    f4c09b91
testutils.c 35.0 KB