projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed bug #2352: yaz-marcdump crashes for certain record.
[yaz-moved-to-github.git]
/
src
/
elementset.c
diff --git
a/src/elementset.c
b/src/elementset.c
index
173bc0f
..
8d9816b
100644
(file)
--- a/
src/elementset.c
+++ b/
src/elementset.c
@@
-1,12
+1,10
@@
-/*
- * Copyright (C) 1995-2006, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2008 Index Data
* See the file LICENSE for details.
* See the file LICENSE for details.
- *
- * $Id: elementset.c,v 1.1 2006-11-14 08:48:26 adam Exp $
*/
/**
*/
/**
- * \file tpath.c
- * \brief File Path utilities
+ * \file elementset.c
+ * \brief Z39.50 element set utilities
*/
#if HAVE_CONFIG_H
*/
#if HAVE_CONFIG_H
@@
-33,10
+31,12
@@
const char *yaz_get_esn(Z_RecordComposition *comp)
void yaz_set_esn(Z_RecordComposition **comp_p, const char *esn, NMEM nmem)
{
void yaz_set_esn(Z_RecordComposition **comp_p, const char *esn, NMEM nmem)
{
- Z_RecordComposition *comp = nmem_malloc(nmem, sizeof(*comp));
+ Z_RecordComposition *comp = (Z_RecordComposition *)
+ nmem_malloc(nmem, sizeof(*comp));
comp->which = Z_RecordComp_simple;
comp->which = Z_RecordComp_simple;
- comp->u.simple = nmem_malloc(nmem, sizeof(*comp->u.simple));
+ comp->u.simple = (Z_ElementSetNames *)
+ nmem_malloc(nmem, sizeof(*comp->u.simple));
comp->u.simple->which = Z_ElementSetNames_generic;
comp->u.simple->u.generic = nmem_strdup(nmem, esn);
*comp_p = comp;
comp->u.simple->which = Z_ElementSetNames_generic;
comp->u.simple->u.generic = nmem_strdup(nmem, esn);
*comp_p = comp;