#include <assert.h>
#include <getopt.h>
-#include "libustd.h"
+#include "ust/ustd.h"
#include "usterr.h"
char *sock_path=NULL;
/* pad with empty bytes */
pad_size = PAGE_ALIGN(valid_length)-valid_length;
if(pad_size) {
- tmp = malloc(pad_size);
- memset(tmp, 0, pad_size);
+ tmp = zmalloc(pad_size);
result = patient_write(buf_local->file_fd, tmp, pad_size);
if(result == -1) {
ERR("Error writing to buffer file");
int result;
int fd;
struct buffer_info_local *buf_local =
- malloc(sizeof(struct buffer_info_local));
+ zmalloc(sizeof(struct buffer_info_local));
if(!buf_local) {
ERR("could not allocate buffer_info_local struct");
struct libustd_callbacks *new_callbacks()
{
struct libustd_callbacks *callbacks =
- malloc(sizeof(struct libustd_callbacks));
+ zmalloc(sizeof(struct libustd_callbacks));
if(!callbacks)
return NULL;
int start_ustd(int fd)
{
- struct ustcomm_ustd ustd;
int result;
sigset_t sigset;
struct sigaction sa;
- int timeout = -1;
struct libustd_callbacks *callbacks = new_callbacks();
if(!callbacks) {