X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=odr%2Fodr_oid.c;fp=odr%2Fodr_oid.c;h=780cbdd8d573e6295004248dac48ad7ae0cd8ad9;hb=b40d7c8dfa49bf5e6800688e1dfb1373856796a8;hp=ed87f33efd06d0d8d5af5b6cfaee47625042d609;hpb=779afe2804f2dccc96d311862afceb22f5f3ac70;p=yaz-moved-to-github.git diff --git a/odr/odr_oid.c b/odr/odr_oid.c index ed87f33..780cbdd 100644 --- a/odr/odr_oid.c +++ b/odr/odr_oid.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: odr_oid.c,v $ - * Revision 1.1 1995-02-03 17:04:38 quinn + * Revision 1.2 1995-02-07 14:13:46 quinn + * Bug fixes. + * + * Revision 1.1 1995/02/03 17:04:38 quinn * Initial revision * * @@ -26,7 +29,10 @@ int odr_oid(ODR o, Odr_oid **p, int opt) o->t_tag = ODR_OID; } if ((res = ber_tag(o, *p, o->t_class, o->t_tag, &cons)) < 0) + { + *p = 0; return 0; + } if (!res || cons) { *p = 0; @@ -37,7 +43,7 @@ int odr_oid(ODR o, Odr_oid **p, int opt) fprintf(o->print, "OID\n"); return 1; } - if (o->direction == ODR_DECODE && !*p) + if (o->direction == ODR_DECODE) *p = nalloc(o, ODR_OID_SIZE); return ber_oid(o, *p); }