projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: consumerd: crash occurs when taking snapshot of ust channel
[lttng-tools.git]
/
tests
/
utils
/
tap
/
tap.c
diff --git
a/tests/utils/tap/tap.c
b/tests/utils/tap/tap.c
index a430951193328aca551e34dfa1f3622a9b23ef28..08dfa658ca76e4e3cdca4ab1fca7f1c694b4d791 100644
(file)
--- a/
tests/utils/tap/tap.c
+++ b/
tests/utils/tap/tap.c
@@
-24,7
+24,6
@@
* SUCH DAMAGE.
*/
* SUCH DAMAGE.
*/
-#define _GNU_SOURCE
#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
@@
-83,7
+82,9
@@
_gen_result(int ok, const char *func, char *file, unsigned int line,
expansions on it */
if(test_name != NULL) {
va_start(ap, test_name);
expansions on it */
if(test_name != NULL) {
va_start(ap, test_name);
- vasprintf(&local_test_name, test_name, ap);
+ if (vasprintf(&local_test_name, test_name, ap) == -1) {
+ local_test_name = NULL;
+ }
va_end(ap);
/* Make sure the test name contains more than digits
va_end(ap);
/* Make sure the test name contains more than digits
@@
-294,12
+295,14
@@
int
skip(unsigned int n, char *fmt, ...)
{
va_list ap;
skip(unsigned int n, char *fmt, ...)
{
va_list ap;
- char *skip_msg;
+ char *skip_msg
= NULL
;
LOCK;
va_start(ap, fmt);
LOCK;
va_start(ap, fmt);
- asprintf(&skip_msg, fmt, ap);
+ if (asprintf(&skip_msg, fmt, ap) == -1) {
+ skip_msg = NULL;
+ }
va_end(ap);
while(n-- > 0) {
va_end(ap);
while(n-- > 0) {
@@
-324,7
+327,9
@@
todo_start(char *fmt, ...)
LOCK;
va_start(ap, fmt);
LOCK;
va_start(ap, fmt);
- vasprintf(&todo_msg, fmt, ap);
+ if (vasprintf(&todo_msg, fmt, ap) == -1) {
+ todo_msg = NULL;
+ }
va_end(ap);
todo = 1;
va_end(ap);
todo = 1;
This page took
0.023756 seconds
and
4
git commands to generate.