diff options
author | FreeArtMan <dos21h@gmail.com> | 2016-05-24 00:00:45 +0100 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2016-05-24 00:00:45 +0100 |
commit | 60f08b0a4676943651bc7b66cb8531325b1c6132 (patch) | |
tree | 5cea9737ea510f579cefa6a4712bf8caf0577da7 /buf.c | |
parent | cb141140579d796ae5cafe6da52b4f0b87be6a84 (diff) | |
download | ihe-60f08b0a4676943651bc7b66cb8531325b1c6132.tar.gz ihe-60f08b0a4676943651bc7b66cb8531325b1c6132.zip |
Added resize c
Diffstat (limited to 'buf.c')
-rw-r--r-- | buf.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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) |