X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fodr_int.c;h=5e3ed97e2782616e815e0f3202c141641cf25960;hb=202c86ec645b0ec72aa9123dcdd8f735153114ea;hp=a039f43312ba6d5ded6ad23a70272dfb90849ff4;hpb=379504a233e3e2cc85bca1e7b6d864f1395aec7c;p=yaz-moved-to-github.git diff --git a/src/odr_int.c b/src/odr_int.c index a039f43..5e3ed97 100644 --- a/src/odr_int.c +++ b/src/odr_int.c @@ -16,7 +16,7 @@ * Top level integer en/decoder. * Returns 1 on success, 0 on error. */ -int odr_integer(ODR o, int **p, int opt, const char *name) +int odr_integer(ODR o, Odr_int **p, int opt, const char *name) { int res, cons = 0; @@ -35,7 +35,7 @@ int odr_integer(ODR o, int **p, int opt, const char *name) if (o->direction == ODR_PRINT) { odr_prname(o, name); - odr_printf(o, "%d\n", **p); + odr_printf(o, ODR_INT_PRINTF "\n", **p); return 1; } if (cons) @@ -44,7 +44,7 @@ int odr_integer(ODR o, int **p, int opt, const char *name) return 0; } if (o->direction == ODR_DECODE) - *p = (int *)odr_malloc(o, sizeof(int)); + *p = (Odr_int *)odr_malloc(o, sizeof(**p)); return ber_integer(o, *p); } /*