X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=util%2Fattrfind.c;h=78219482cda1e9cf0fb17ffdd52fd1d8c83199b0;hp=79ed7a6289e90b95e4e83daead0a47940cf90d6a;hb=aeea139423b8eaf28a4de53b3d7b2ad1f22284e7;hpb=0052fb5520062c328006dc3537f39d28e88f3579 diff --git a/util/attrfind.c b/util/attrfind.c index 79ed7a6..7821948 100644 --- a/util/attrfind.c +++ b/util/attrfind.c @@ -55,7 +55,7 @@ int attr_find_ex(AttrType *src, const Odr_oid **attribute_set_oid, element = src->attributeList[src->major]; if (src->type == *element->attributeType) { - switch (element->which) + switch (element->which) { case Z_AttributeValue_numeric: ++(src->major); @@ -68,20 +68,20 @@ int attr_find_ex(AttrType *src, const Odr_oid **attribute_set_oid, break; if (element->attributeSet && attribute_set_oid) *attribute_set_oid = element->attributeSet; - if (element->value.complex->list[src->minor]->which == + if (element->value.complex->list[src->minor]->which == Z_StringOrNumeric_numeric) { ++(src->minor); return *element->value.complex->list[src->minor-1]->u.numeric; } - else if (element->value.complex->list[src->minor]->which == + else if (element->value.complex->list[src->minor]->which == Z_StringOrNumeric_string) { if (!string_value) break; ++(src->minor); - *string_value = + *string_value = element->value.complex->list[src->minor-1]->u.string; return -2; }