diff options
author | FreeArtMan <dos21h@gmail.com> | 2017-10-01 17:01:58 +0100 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2017-10-01 17:01:58 +0100 |
commit | bed9bfcdf6b7740cc32ccf260f024e7c0a4e7503 (patch) | |
tree | 35cff48ca9b11faf9097b964f5de0d2174d0f6e0 /extlibs | |
parent | f0128b5e83f460d4678343af85a9a95ea285c5a9 (diff) | |
download | agni-bed9bfcdf6b7740cc32ccf260f024e7c0a4e7503.tar.gz agni-bed9bfcdf6b7740cc32ccf260f024e7c0a4e7503.zip |
Update netbytes
Diffstat (limited to 'extlibs')
-rw-r--r-- | extlibs/netbytes.c | 18 |
1 files 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)&& |