X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fcopy_types.c;h=2afd1dcda3a61b63ace5fd1962d59c97647cf5e1;hp=73519f1a9c7440d9e49cbcdb4b874dc1976bf46a;hb=896b145fa7a02199bfc3e8aa824c018b9d7cbf98;hpb=625aa16bd5f85153e468ddbfb8d213937890dd30 diff --git a/src/copy_types.c b/src/copy_types.c index 73519f1..2afd1dc 100644 --- a/src/copy_types.c +++ b/src/copy_types.c @@ -1,11 +1,13 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2009 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ - /** \file copy_types.c \brief Copies various Z39.50 types */ +#if HAVE_CONFIG_H +#include +#endif #include @@ -16,9 +18,7 @@ Z_##x *yaz_clone_z_##x(Z_##x *q, NMEM nmem_out) \ Z_##x *q1 = 0; \ ODR enc = odr_createmem(ODR_ENCODE); \ ODR dec = odr_createmem(ODR_DECODE); \ - if (!z_##x(enc, &q, 0, 0)) \ - return 0; \ - else \ + if (z_##x(enc, &q, 0, 0)) \ { \ int len; \ char *buf = odr_getbuf(enc, &len, 0); \