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 in elementsetname-handling in piggybacked presents.
[yaz-moved-to-github.git]
/
odr
/
odr_mem.c
diff --git
a/odr/odr_mem.c
b/odr/odr_mem.c
index
e342625
..
185b581
100644
(file)
--- a/
odr/odr_mem.c
+++ b/
odr/odr_mem.c
@@
-4,7
+4,13
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: odr_mem.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: odr_mem.c,v $
- * Revision 1.8 1995-09-29 17:12:24 quinn
+ * Revision 1.10 1995-10-25 16:58:19 quinn
+ * Stupid bug in odr_malloc
+ *
+ * Revision 1.9 1995/10/13 16:08:08 quinn
+ * Added OID utility
+ *
+ * Revision 1.8 1995/09/29 17:12:24 quinn
* Smallish
*
* Revision 1.7 1995/09/27 15:02:59 quinn
* Smallish
*
* Revision 1.7 1995/09/27 15:02:59 quinn
@@
-116,9
+122,16
@@
ODR_MEM odr_extract_mem(ODR o)
void *odr_malloc(ODR o, int size)
{
void *odr_malloc(ODR o, int size)
{
- struct odr_memblock *p = o->mem;
+ struct odr_memblock *p;
char *r;
char *r;
+ if (!o)
+ {
+ if (!(r = malloc(size)))
+ abort();
+ return r;
+ }
+ p = o->mem;
if (!p || p->size - p->top < size)
if (!(p = get_block(size)))
abort();
if (!p || p->size - p->top < size)
if (!(p = get_block(size)))
abort();