aboutsummaryrefslogblamecommitdiffstats
path: root/libcoopgamma_context_initialise.c
blob: 5ece7d85241d81bd6595b30eee8c7d0f03583733 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                                                      
/* 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;
	return 0;
}