/* Set up max poll set size */
lttng_poll_set_max_size();
- if (strlen(command_sock_path) == 0) {
+ if (*command_sock_path == '\0') {
switch (opt_type) {
case LTTNG_CONSUMER_KERNEL:
snprintf(command_sock_path, PATH_MAX, DEFAULT_KCONSUMERD_CMD_SOCK_PATH,
}
lttng_consumer_set_command_sock_path(ctx, command_sock_path);
- if (strlen(error_sock_path) == 0) {
+ if (*error_sock_path == '\0') {
switch (opt_type) {
case LTTNG_CONSUMER_KERNEL:
snprintf(error_sock_path, PATH_MAX, DEFAULT_KCONSUMERD_ERR_SOCK_PATH,
* Do we have a UST url set. If yes, this means we have both kernel and UST
* to print.
*/
- if (strlen(tmp_uurl) > 0) {
+ if (*tmp_uurl != '\0') {
ret = snprintf(dst, size, "[K]: %s [data: %d] -- [U]: %s [data: %d]",
tmp_urls, kdata_port, tmp_uurl, udata_port);
} else {
LTTNG_SYMBOL_NAME_LEN);
kctx.u.perf_counter.name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0';
- if (strlen(channel_name) == 0) {
+ if (*channel_name == '\0') {
ret = add_kctx_all_channels(ksession, &kctx);
if (ret != LTTNG_OK) {
goto error;
}
/* Get UST channel if defined */
- if (strlen(channel_name) != 0) {
+ if (channel_name != '\0') {
uchan = trace_ust_find_channel_by_name(chan_ht, channel_name);
if (uchan == NULL) {
ret = LTTNG_ERR_UST_CHAN_NOT_FOUND;
*/
lks->tmp_consumer = NULL;
- if (path && strlen(path) > 0) {
+ if (*path != '\0') {
int ret;
/* Use the default consumer output which is the tracing session path. */
lus->tmp_consumer = NULL;
/* Use the default consumer output which is the tracing session path. */
- if (path && strlen(path) > 0) {
+ if (*path != '\0') {
int ret;
ret = snprintf(lus->consumer->dst.trace_path, PATH_MAX,
strncpy(ev->attr.probe.symbol_name, name, LTTNG_SYMBOL_NAME_LEN);
ev->attr.probe.symbol_name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0';
DBG("probe symbol %s", ev->attr.probe.symbol_name);
- if (strlen(s_hex) == 0) {
+ if (*s_hex == '\0') {
ERR("Invalid probe offset %s", s_hex);
ret = -1;
goto end;
/* Check for address */
ret = sscanf(opt, "%s", s_hex);
if (ret > 0) {
- if (strlen(s_hex) == 0) {
+ if (*s_hex == '\0') {
ERR("Invalid probe address %s", s_hex);
ret = -1;
goto end;
return ret;
}
- if (strlen(sessiond_sock_path) == 0) {
+ if (*sessiond_sock_path == '\0') {
/*
* No socket path set. Weird error which means the constructor was not
* called.