aboutsummaryrefslogtreecommitdiffstats
path: root/libcoopgamma_context_initialise.c
blob: b26a559637fb8d361c31498098a9daffc6c35399 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* See LICENSE file for copyright and license details. */
#include "common.h"


/**
 * Initialise a `libcoopgamma_context_t`
 * 
 * @param   this  The record to initialise
 * @return        Zero on success, -1 on error
 */
int
libcoopgamma_context_initialise(libcoopgamma_context_t *restrict this)
{
	memset(this, 0, sizeof(*this));
	this->fd = -1;
	this->blocking = 1;
	this->outbound = NULL;
	this->inbound = NULL;
	return 0;
}