/* This file is part of the Zebra server.
- Copyright (C) 1994-2011 Index Data
+ Copyright (C) Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
sr->num = no_terms;
sr->elements = odr_malloc(r->stream, sr->num *
sizeof(*sr->elements));
- for (i = 0; i<no_terms; i++)
+ for (i = 0; i < no_terms; i++)
{
Z_SearchInfoReport_s *se;
Z_Term *term;
break;
case Z_Term_general:
term->which = Z_Term_general;
- term->u.general = odr_malloc(r->stream, sizeof(*term->u.general));
- term->u.general->size = term->u.general->len = len;
- term->u.general->buf = odr_malloc(r->stream, len);
- memcpy(term->u.general->buf, outbuf, len);
+ term->u.general = odr_create_Odr_oct(r->stream,
+#if YAZ_VERSIONL < 0x50000
+ (unsigned char *)
+#endif
+ outbuf, len);
break;
default:
term->which = Z_Term_general;