X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fargpar-utils%2Fargpar-utils.cpp;h=7c8934778a5b478ac1252d937a61f44151e577ea;hp=c244f402944be0f99747f045dac9ef19f1dd63b8;hb=cd9adb8b829564212158943a0d279bb35322ab30;hpb=e665dfbce25215d5ec77ff03a279c7163b337db1 diff --git a/src/common/argpar-utils/argpar-utils.cpp b/src/common/argpar-utils/argpar-utils.cpp index c244f4029..7c8934778 100644 --- a/src/common/argpar-utils/argpar-utils.cpp +++ b/src/common/argpar-utils/argpar-utils.cpp @@ -31,8 +31,8 @@ static ATTR_FORMAT_PRINTF(4, 0) char *format_arg_error_v(const struct argpar_err const char *context_fmt, va_list args) { - char *str = NULL; - char *str_ret = NULL; + char *str = nullptr; + char *str_ret = nullptr; int ret; if (context_fmt) { @@ -42,7 +42,7 @@ static ATTR_FORMAT_PRINTF(4, 0) char *format_arg_error_v(const struct argpar_err * If vasprintf fails, the content of str is undefined, * and we shouldn't try to free it. */ - str = NULL; + str = nullptr; goto end; } @@ -121,7 +121,7 @@ static ATTR_FORMAT_PRINTF(4, 0) char *format_arg_error_v(const struct argpar_err } str_ret = str; - str = NULL; + str = nullptr; end: free(str); @@ -138,7 +138,7 @@ enum parse_next_item_status parse_next_item(struct argpar_iter *iter, ...) { enum argpar_iter_next_status status; - const struct argpar_error *error = NULL; + const struct argpar_error *error = nullptr; enum parse_next_item_status ret; ARGPAR_ITEM_DESTROY_AND_RESET(*item); @@ -187,7 +187,7 @@ enum parse_next_item_status parse_next_item(struct argpar_iter *iter, if (error_out) { argpar_error_destroy(*error_out); *error_out = error; - error = NULL; + error = nullptr; } argpar_error_destroy(error);