projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sessiond: log error message when libkmod operations fail
[lttng-tools.git]
/
src
/
vendor
/
msgpack
/
fbuffer.h
diff --git
a/src/vendor/msgpack/fbuffer.h
b/src/vendor/msgpack/fbuffer.h
index d478008c8d65b72484aeba5ac93e9804fe9aef35..5c847dd97b32c6740c9b4efe67f794145439cd28 100644
(file)
--- a/
src/vendor/msgpack/fbuffer.h
+++ b/
src/vendor/msgpack/fbuffer.h
@@
-11,6
+11,7
@@
#define MSGPACK_FBUFFER_H
#include <stdio.h>
#define MSGPACK_FBUFFER_H
#include <stdio.h>
+#include <assert.h>
#ifdef __cplusplus
extern "C" {
#ifdef __cplusplus
extern "C" {
@@
-25,6
+26,9
@@
extern "C" {
static inline int msgpack_fbuffer_write(void* data, const char* buf, size_t len)
{
static inline int msgpack_fbuffer_write(void* data, const char* buf, size_t len)
{
+ assert(buf || len == 0);
+ if(!buf) return 0;
+
return (1 == fwrite(buf, len, 1, (FILE *)data)) ? 0 : -1;
}
return (1 == fwrite(buf, len, 1, (FILE *)data)) ? 0 : -1;
}
This page took
0.023346 seconds
and
4
git commands to generate.