*/
#define _LGPL_SOURCE
-#include <assert.h>
#include <limits.h>
#include <unistd.h>
* error occurred.
* The error can be checked by querying errno.
*/
-LTTNG_HIDDEN
ssize_t lttng_read(int fd, void *buf, size_t count)
{
size_t i = 0;
ssize_t ret;
- assert(buf);
+ LTTNG_ASSERT(buf);
/*
* Deny a read count that can be bigger then the returned value max size.
}
}
i += ret;
- assert(i <= count);
+ LTTNG_ASSERT(i <= count);
} while (count - i > 0 && ret > 0);
return i;
}
}
-LTTNG_HIDDEN
ssize_t lttng_write(int fd, const void *buf, size_t count)
{
size_t i = 0;
ssize_t ret;
- assert(buf);
+ LTTNG_ASSERT(buf);
/*
* Deny a write count that can be bigger then the returned value max size.
}
}
i += ret;
- assert(i <= count);
+ LTTNG_ASSERT(i <= count);
} while (count - i > 0 && ret > 0);
return i;