From 60f08b0a4676943651bc7b66cb8531325b1c6132 Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Tue, 24 May 2016 00:00:45 +0100 Subject: Added resize c --- buf.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'buf.c') diff --git a/buf.c b/buf.c index 440ac76..d0519e5 100644 --- a/buf.c +++ b/buf.c @@ -11,6 +11,21 @@ buf_t* buf_init() } +int buf_not_null( buf_t *bf ) +{ + + if ( bf == NULL ) + return 0; + + if ( bf->buf == NULL ) + return 0; + + if ( bf->buf_size < 0 ) + return 0; + + return 1; +} + int buf_size( buf_t *bf, int size ) { if (bf->buf != NULL) -- cgit v1.2.3