X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=retrieval%2Fd1_espec.c;h=975807978beccd22b916395db81f5488f7bf81c7;hb=13710cb8cd0a6b8d6a1f88ff69f3a2ec2ec9769c;hp=3c62d058b119ae9b37c3d1bc2b0ae106833cda9d;hpb=a309d6ece06c0ab732d98c59f2718efaebd01ec6;p=yaz-moved-to-github.git diff --git a/retrieval/d1_espec.c b/retrieval/d1_espec.c index 3c62d05..9758079 100644 --- a/retrieval/d1_espec.c +++ b/retrieval/d1_espec.c @@ -4,7 +4,13 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: d1_espec.c,v $ - * Revision 1.3 1995-11-13 09:27:34 quinn + * Revision 1.5 1996-01-02 08:57:44 quinn + * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass + * + * Revision 1.4 1995/12/05 11:16:10 quinn + * Fixed malloc of 0. + * + * Revision 1.3 1995/11/13 09:27:34 quinn * Fiddling with the variant stuff. * * Revision 1.2 1995/11/01 16:34:56 quinn @@ -36,11 +42,14 @@ static Z_Variant *read_variant(int argc, char **argv, ODR o) int i; var1.proto = PROTO_Z3950; - var1.class = CLASS_VARSET; + var1.oclass = CLASS_VARSET; var1.value = VAL_VAR1; r->globalVariantSetId = odr_oiddup(o, oid_getoidbyent(&var1)); - r->triples = odr_malloc(o, sizeof(Z_Triple*) * argc); + if (argc) + r->triples = odr_malloc(o, sizeof(Z_Triple*) * argc); + else + r->triples = 0; r->num_triples = argc; for (i = 0; i < argc; i++) {