From bed9bfcdf6b7740cc32ccf260f024e7c0a4e7503 Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Sun, 1 Oct 2017 17:01:58 +0100 Subject: Update netbytes --- extlibs/netbytes.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/extlibs/netbytes.c b/extlibs/netbytes.c index 68a04e3..1f8433b 100644 --- a/extlibs/netbytes.c +++ b/extlibs/netbytes.c @@ -285,7 +285,7 @@ uint8_t *nb_create( netbyte_store *store ) if ( store->count < 1 ) return NULL; - store->size == 0; + store->size = 0; /* precalc needed size starting from zero not metter what */ store->size += sizeof(__NBT_SIZE); @@ -483,7 +483,7 @@ int nb_free(netbyte_store *store) } case NBT_U32: { - nb_u32 *u32 = (nb_u32 *)val; + //nb_u32 *u32 = (nb_u32 *)val; //free(u32); //u32 = NULL; store->types[i].nb_val=NULL; @@ -505,7 +505,7 @@ int nb_load( netbyte_store *store, uint8_t *data ) __NBT_TYPED type; int iter=1; uint8_t *c = data; - int count; + //int count; if ( store == NULL ) { @@ -530,7 +530,7 @@ int nb_load( netbyte_store *store, uint8_t *data ) return 0; } - count = 0; + //count = 0; memset( store, 0, sizeof(netbyte_store) ); while ( iter ) { @@ -677,7 +677,7 @@ int nb_count( netbyte_store *store ) int nb_type( netbyte_store *store, int count, __NBT_TYPED **type ) { - __NBT_TYPED nbt; + //__NBT_TYPED nbt; if ( store == NULL ) { return -1; @@ -715,7 +715,7 @@ int nb_val( netbyte_store *store, int count, __nb_type **type ) int nb_fread( netbyte_store *store, int fd) { __NBT_SIZE size; - ssize_t ret; + //ssize_t ret; off_t old_seek; uint8_t *nb; @@ -834,7 +834,7 @@ int nb_match(netbyte_store *store, nb_tok_arr *pattern) { printf("[%d]\n",i); __NBT_TYPED type = store->types[i].type; - void *val = store->types[i].nb_val; + //void *val = store->types[i].nb_val; nb_tok pat_tok = pattern->tok[i]; int eq = 0; @@ -843,7 +843,7 @@ int nb_match(netbyte_store *store, nb_tok_arr *pattern) case NBT_U8: { printf("NBT_U8\n"); - nb_u8 *u8 = (nb_u8 *)val; + //nb_u8 *u8 = (nb_u8 *)val; if ((pat_tok.type_size == 8)&& (pat_tok.sign == SIGN_UNSIGNED)&& @@ -857,7 +857,7 @@ int nb_match(netbyte_store *store, nb_tok_arr *pattern) case NBT_U8ARRAY: { printf("NBT_U8ARRAY\n"); - nb_u8arr *u8arr = (nb_u8arr *)val; + //nb_u8arr *u8arr = (nb_u8arr *)val; if ((pat_tok.type_size == 8)&& (pat_tok.sign == SIGN_UNSIGNED)&& -- cgit v1.2.3