diff options
Diffstat (limited to 'lib/services/services.c')
-rw-r--r-- | lib/services/services.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/services/services.c b/lib/services/services.c index e438443..94a8afc 100644 --- a/lib/services/services.c +++ b/lib/services/services.c @@ -1,5 +1,5 @@ /* - * Copyright 2010-2023 the Pacemaker project contributors + * Copyright 2010-2024 the Pacemaker project contributors * * The version control history for this file may have further details. * @@ -26,7 +26,7 @@ #include <crm/services.h> #include <crm/services_internal.h> #include <crm/stonith-ng.h> -#include <crm/msg_xml.h> +#include <crm/common/xml.h> #include "services_private.h" #include "services_ocf.h" #include "services_lsb.h" @@ -357,7 +357,7 @@ services_action_create_generic(const char *exec, const char *args[]) { svc_action_t *op = new_action(); - CRM_ASSERT(op != NULL); + pcmk__mem_assert(op); op->opaque->exec = strdup(exec); op->opaque->args[0] = strdup(exec); @@ -415,10 +415,8 @@ services_alert_create(const char *id, const char *exec, int timeout, { svc_action_t *action = services_action_create_generic(exec, NULL); - action->id = strdup(id); - action->standard = strdup(PCMK_RESOURCE_CLASS_ALERT); - CRM_ASSERT((action->id != NULL) && (action->standard != NULL)); - + action->id = pcmk__str_copy(id); + action->standard = pcmk__str_copy(PCMK_RESOURCE_CLASS_ALERT); action->timeout = timeout; action->params = params; action->sequence = sequence; |