Switch/ext/ebtree/ebtree/common/chunk.h
static inline int chunk_initlen(struct chunk *chk, char *str, size_t size, int len)
{

	if (len < 0 || (size && len > size))
		return 0;

	chk->str  = str;
	chk->len  = len;
	chk->size = size;

	return 1;
}
/* report 0 in case of error, 1 if OK. */
report 0 in case of error, 1 if OK.
report 0 in case of error 1 if OK .
static inline int chunk_initlen(struct chunk *chk, char *str, size_t size, int len)
{
	if (len < 0 || (size && len > size))
		return 0;
	chk->str  = str;
	chk->len  = len;
	chk->size = size;
	return 1;
}
static inline int chunk_initlen ( struct chunk * chk , char * str , size_t size , int len ) { if ( len < 0 || ( size && len > size ) ) return 0 ; chk -> str = str ; chk -> len = len ; chk -> size = size ; return 1 ; }
report 0 in case of error, 1 if OK.
report 0 in case of error 1 if OK .