Commit ed774b9a authored by Senthil Prabakaran's avatar Senthil Prabakaran Committed by Mouse

Fix Lint issues

parent 7c619357
This diff is collapsed.
...@@ -17,7 +17,6 @@ jer_encode(const asn_TYPE_descriptor_t *td, const void *sptr, ...@@ -17,7 +17,6 @@ jer_encode(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_enc_rval_t tmper; asn_enc_rval_t tmper;
const char *mname; const char *mname;
size_t mlen; size_t mlen;
int xcan = 0;
if(!td || !sptr) goto cb_failed; if(!td || !sptr) goto cb_failed;
...@@ -67,32 +66,3 @@ jer_fprint(FILE *stream, const asn_TYPE_descriptor_t *td, const void *sptr) { ...@@ -67,32 +66,3 @@ jer_fprint(FILE *stream, const asn_TYPE_descriptor_t *td, const void *sptr) {
return fflush(stream); return fflush(stream);
} }
struct jer_buffer {
char *buffer;
size_t buffer_size;
size_t allocated_size;
};
static int
jer__buffer_append(const void *buffer, size_t size, void *app_key) {
struct jer_buffer *xb = app_key;
while(xb->buffer_size + size + 1 > xb->allocated_size) {
size_t new_size = 2 * (xb->allocated_size ? xb->allocated_size : 64);
char *new_buf = MALLOC(new_size);
if(!new_buf) return -1;
if (xb->buffer) {
memcpy(new_buf, xb->buffer, xb->buffer_size);
}
FREEMEM(xb->buffer);
xb->buffer = new_buf;
xb->allocated_size = new_size;
}
memcpy(xb->buffer + xb->buffer_size, buffer, size);
xb->buffer_size += size;
xb->buffer[xb->buffer_size] = '\0';
return 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