X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fdumpber.c;h=a6901e7e359849326a75a305c5983171492c91c0;hp=5d49e7f8ca1947e9f482bf12b84af8bbf9c28704;hb=5c1eb188e9cf6f0dd2e435a1f81938f258515edb;hpb=0c46d2e66bdeea1600e700124a81a5d0a65d349e diff --git a/src/dumpber.c b/src/dumpber.c index 5d49e7f..a6901e7 100644 --- a/src/dumpber.c +++ b/src/dumpber.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ @@ -30,11 +30,11 @@ static int do_dumpBER(FILE *f, const char *buf, int len, int level, int offset) return 0; if (!buf[0] && !buf[1]) return 0; - if ((res = ber_dectag((unsigned char*)b, &zclass, &tag, &cons, len)) <= 0) + if ((res = ber_dectag(b, &zclass, &tag, &cons, len)) <= 0) return 0; if (res > len) { - fprintf(f, "%5d: %s : Unexpected enf of buffer\n", offset, level_str); + fprintf(f, "%5d: %s : Unexpected end of buffer\n", offset, level_str); return 0; } fprintf(f, "%5d: %s", offset, level_str); @@ -62,7 +62,7 @@ static int do_dumpBER(FILE *f, const char *buf, int len, int level, int offset) b += res; taglen = res; len -= res; - if ((res = ber_declen((unsigned char*)b, &ll, len)) <= 0) + if ((res = ber_declen(b, &ll, len)) <= 0) { fprintf(f, "\n%sBad length\n", level_str); return 0;