Commit b7c40b6a authored by Lev Walkin's avatar Lev Walkin

typos and format string fixes

parent d4c1673d
...@@ -115,7 +115,7 @@ load_object_from(const char *fname, enum expectation expectation, char *fbuf, si ...@@ -115,7 +115,7 @@ load_object_from(const char *fname, enum expectation expectation, char *fbuf, si
int fbuf_left = size; int fbuf_left = size;
int fbuf_chunk = csize; int fbuf_chunk = csize;
fprintf(stderr, "LOADING OBJECT OF SIZE %d FROM [%s] as %s," fprintf(stderr, "LOADING OBJECT OF SIZE %zd FROM [%s] as %s,"
" chunks %zd\n", " chunks %zd\n",
size, fname, how==AS_PER?"PER":"XER", csize); size, fname, how==AS_PER?"PER":"XER", csize);
...@@ -170,7 +170,7 @@ load_object_from(const char *fname, enum expectation expectation, char *fbuf, si ...@@ -170,7 +170,7 @@ load_object_from(const char *fname, enum expectation expectation, char *fbuf, si
if(expectation != EXP_BROKEN) { if(expectation != EXP_BROKEN) {
assert(rval.code == RC_OK); assert(rval.code == RC_OK);
if(how == AS_PER) { if(how == AS_PER) {
fprintf(stderr, "[left %d, off %d, size %d]\n", fprintf(stderr, "[left %d, off %d, size %zd]\n",
fbuf_left, fbuf_offset, size); fbuf_left, fbuf_offset, size);
assert(fbuf_offset == size); assert(fbuf_offset == size);
} else { } else {
......
...@@ -115,7 +115,7 @@ load_object_from(const char *fname, enum expectation expectation, char *fbuf, si ...@@ -115,7 +115,7 @@ load_object_from(const char *fname, enum expectation expectation, char *fbuf, si
int fbuf_left = size; int fbuf_left = size;
int fbuf_chunk = csize; int fbuf_chunk = csize;
fprintf(stderr, "LOADING OBJECT OF SIZE %d FROM [%s] as %s," fprintf(stderr, "LOADING OBJECT OF SIZE %zd FROM [%s] as %s,"
" chunks %zd\n", " chunks %zd\n",
size, fname, how==AS_PER?"PER":"XER", csize); size, fname, how==AS_PER?"PER":"XER", csize);
...@@ -170,7 +170,7 @@ load_object_from(const char *fname, enum expectation expectation, char *fbuf, si ...@@ -170,7 +170,7 @@ load_object_from(const char *fname, enum expectation expectation, char *fbuf, si
if(expectation != EXP_BROKEN) { if(expectation != EXP_BROKEN) {
assert(rval.code == RC_OK); assert(rval.code == RC_OK);
if(how == AS_PER) { if(how == AS_PER) {
fprintf(stderr, "[left %d, off %d, size %d]\n", fprintf(stderr, "[left %d, off %d, size %zd]\n",
fbuf_left, fbuf_offset, size); fbuf_left, fbuf_offset, size);
assert(fbuf_offset == size); assert(fbuf_offset == size);
} else { } else {
......
...@@ -69,7 +69,7 @@ uint8_t buf1_reconstr[] = { ...@@ -69,7 +69,7 @@ uint8_t buf1_reconstr[] = {
}; };
sie_t buf_pos; size_t buf_pos;
static int bytes_compare(const void *bufferp, size_t size, void *key) { static int bytes_compare(const void *bufferp, size_t size, void *key) {
const uint8_t *buffer = bufferp; const uint8_t *buffer = bufferp;
assert(buf_pos + size <= sizeof(buf1_reconstr)); assert(buf_pos + size <= sizeof(buf1_reconstr));
...@@ -81,7 +81,7 @@ static int bytes_compare(const void *bufferp, size_t size, void *key) { ...@@ -81,7 +81,7 @@ static int bytes_compare(const void *bufferp, size_t size, void *key) {
for(; size; buf_pos++, size--, buffer++) { for(; size; buf_pos++, size--, buffer++) {
if(buf1_reconstr[buf_pos] != *buffer) { if(buf1_reconstr[buf_pos] != *buffer) {
fprintf(stderr, fprintf(stderr,
"Byte %d is different: %d != %d (%x != %x)\n", "Byte %zd is different: %d != %d (%x != %x)\n",
buf_pos, buf_pos,
*buffer, buf1_reconstr[buf_pos], *buffer, buf1_reconstr[buf_pos],
*buffer, buf1_reconstr[buf_pos] *buffer, buf1_reconstr[buf_pos]
......
...@@ -93,7 +93,7 @@ load_object_from(enum expectation expectation, char *fbuf, size_t size, enum der ...@@ -93,7 +93,7 @@ load_object_from(enum expectation expectation, char *fbuf, size_t size, enum der
asn_dec_rval_t (*zer_decode)(struct asn_codec_ctx_s *, asn_dec_rval_t (*zer_decode)(struct asn_codec_ctx_s *,
asn_TYPE_descriptor_t *, void **, const void *, size_t); asn_TYPE_descriptor_t *, void **, const void *, size_t);
PDU_t *st = 0; PDU_t *st = 0;
int csize = 1; size_t csize = 1;
if(how == AS_DER) if(how == AS_DER)
zer_decode = ber_decode; zer_decode = ber_decode;
...@@ -109,7 +109,7 @@ load_object_from(enum expectation expectation, char *fbuf, size_t size, enum der ...@@ -109,7 +109,7 @@ load_object_from(enum expectation expectation, char *fbuf, size_t size, enum der
int fbuf_left = size; int fbuf_left = size;
int fbuf_chunk = csize; int fbuf_chunk = csize;
fprintf(stderr, "LOADING OBJECT OF SIZE %d, chunks %d\n", fprintf(stderr, "LOADING OBJECT OF SIZE %zd, chunks %zd\n",
size, csize); size, csize);
if(st) asn_DEF_PDU.free_struct(&asn_DEF_PDU, st, 0); if(st) asn_DEF_PDU.free_struct(&asn_DEF_PDU, st, 0);
......
...@@ -83,7 +83,7 @@ load_object_from(enum expectation expectation, char *fbuf, size_t size, enum der ...@@ -83,7 +83,7 @@ load_object_from(enum expectation expectation, char *fbuf, size_t size, enum der
asn_dec_rval_t (*zer_decode)(struct asn_codec_ctx_s *, asn_dec_rval_t (*zer_decode)(struct asn_codec_ctx_s *,
asn_TYPE_descriptor_t *, void **, const void *, size_t); asn_TYPE_descriptor_t *, void **, const void *, size_t);
PDU_t *st = 0; PDU_t *st = 0;
int csize = 1; size_t csize = 1;
if(how == AS_DER) if(how == AS_DER)
zer_decode = ber_decode; zer_decode = ber_decode;
...@@ -99,7 +99,7 @@ load_object_from(enum expectation expectation, char *fbuf, size_t size, enum der ...@@ -99,7 +99,7 @@ load_object_from(enum expectation expectation, char *fbuf, size_t size, enum der
int fbuf_left = size; int fbuf_left = size;
int fbuf_chunk = csize; int fbuf_chunk = csize;
fprintf(stderr, "LOADING OBJECT OF SIZE %d, chunks %d\n", fprintf(stderr, "LOADING OBJECT OF SIZE %zd, chunks %zd\n",
size, csize); size, csize);
if(st) asn_DEF_PDU.free_struct(&asn_DEF_PDU, st, 0); if(st) asn_DEF_PDU.free_struct(&asn_DEF_PDU, st, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment