X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fhealth%2Fhealth.cpp;h=8181eab931c07aa0c131c8157ce85a6584f8d11c;hb=64803277bbdbe0a943360d918298a48157d9da55;hp=8a07e642607cb6cb401a57c845043ca63870f97e;hpb=8784a4d054e8bfe27af0581fc9441c64a52b1074;p=lttng-tools.git diff --git a/src/common/health/health.cpp b/src/common/health/health.cpp index 8a07e6426..8181eab93 100644 --- a/src/common/health/health.cpp +++ b/src/common/health/health.cpp @@ -13,12 +13,12 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include /* * An application-specific error state for unregistered thread keeps @@ -67,11 +67,11 @@ struct health_app *health_app_create(int nr_types) { struct health_app *ha; - ha = (health_app *) zmalloc(sizeof(*ha)); + ha = zmalloc(); if (!ha) { return NULL; } - ha->flags = (health_flags *) zmalloc(sizeof(*ha->flags) * nr_types); + ha->flags = calloc(nr_types); if (!ha->flags) { goto error_flags; }