projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Force usage of assert() condition when NDEBUG is defined
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
enable_events.c
diff --git
a/src/bin/lttng/commands/enable_events.c
b/src/bin/lttng/commands/enable_events.c
index 948663412fe1c563e2b5f6a08e902eaac0a618ed..bbf7c569906c1f9ef7d4db0c2f2fb7c0d446b1cd 100644
(file)
--- a/
src/bin/lttng/commands/enable_events.c
+++ b/
src/bin/lttng/commands/enable_events.c
@@
-6,7
+6,6
@@
*/
#define _LGPL_SOURCE
*/
#define _LGPL_SOURCE
-#include <assert.h>
#include <popt.h>
#include <stdio.h>
#include <stdlib.h>
#include <popt.h>
#include <stdio.h>
#include <stdlib.h>
@@
-200,7
+199,7
@@
int mi_print_exclusion(const struct lttng_dynamic_pointer_array *exclusions)
size_t i;
const size_t count = lttng_dynamic_pointer_array_get_count(exclusions);
size_t i;
const size_t count = lttng_dynamic_pointer_array_get_count(exclusions);
-
assert
(writer);
+
LTTNG_ASSERT
(writer);
if (count == 0) {
ret = 0;
if (count == 0) {
ret = 0;
@@
-477,7
+476,7
@@
static int enable_events(char *session_name)
dom.buf_type = LTTNG_BUFFER_PER_UID;
} else {
/* Checked by the caller. */
dom.buf_type = LTTNG_BUFFER_PER_UID;
} else {
/* Checked by the caller. */
- a
ssert(0
);
+ a
bort(
);
}
if (opt_exclude) {
}
if (opt_exclude) {
@@
-494,7
+493,7
@@
static int enable_events(char *session_name)
/* Exclusions supported */
break;
default:
/* Exclusions supported */
break;
default:
- a
ssert(0
);
+ a
bort(
);
}
}
}
}
@@
-554,7
+553,7
@@
static int enable_events(char *session_name)
if (opt_loglevel) {
int name_search_ret;
if (opt_loglevel) {
int name_search_ret;
-
assert
(opt_userspace || opt_jul || opt_log4j || opt_python);
+
LTTNG_ASSERT
(opt_userspace || opt_jul || opt_log4j || opt_python);
if (opt_userspace) {
enum lttng_loglevel loglevel;
if (opt_userspace) {
enum lttng_loglevel loglevel;
@@
-585,7
+584,7
@@
static int enable_events(char *session_name)
goto error;
}
} else {
goto error;
}
} else {
-
assert
(opt_userspace || opt_jul || opt_log4j || opt_python);
+
LTTNG_ASSERT
(opt_userspace || opt_jul || opt_log4j || opt_python);
if (opt_userspace) {
ev->loglevel = -1;
} else if (opt_jul) {
if (opt_userspace) {
ev->loglevel = -1;
} else if (opt_jul) {
@@
-844,7
+843,7
@@
static int enable_events(char *session_name)
}
break;
case LTTNG_EVENT_USERSPACE_PROBE:
}
break;
case LTTNG_EVENT_USERSPACE_PROBE:
-
assert
(ev->type == LTTNG_EVENT_USERSPACE_PROBE);
+
LTTNG_ASSERT
(ev->type == LTTNG_EVENT_USERSPACE_PROBE);
ret = parse_userspace_probe_opts(opt_userspace_probe, &uprobe_loc);
if (ret) {
ret = parse_userspace_probe_opts(opt_userspace_probe, &uprobe_loc);
if (ret) {
@@
-999,7
+998,7
@@
static int enable_events(char *session_name)
strncpy(ev->name, event_name, LTTNG_SYMBOL_NAME_LEN);
ev->name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0';
} else {
strncpy(ev->name, event_name, LTTNG_SYMBOL_NAME_LEN);
ev->name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0';
} else {
- a
ssert(0
);
+ a
bort(
);
}
if (!opt_filter) {
}
if (!opt_filter) {
@@
-1078,7
+1077,7
@@
static int enable_events(char *session_name)
exclusion_string);
break;
default:
exclusion_string);
break;
default:
- a
ssert(0
);
+ a
bort(
);
}
}
free(exclusion_string);
}
}
free(exclusion_string);
This page took
0.041767 seconds
and
4
git commands to generate.