Doxygen comments for xmalloc utils. Reformat
[yaz-moved-to-github.git] / test / tstodr.c
index 99cef61..8aa0154 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2008 Index Data
+ * Copyright (C) 1995-2009 Index Data
  * See the file LICENSE for details.
  */
 #include <stdlib.h>
@@ -16,12 +16,12 @@ void tst_MySequence1(ODR encode, ODR decode)
     int ret;
     char *ber_buf;
     int ber_len;
-    Yc_MySequence *s = odr_malloc(encode, sizeof(*s));
+    Yc_MySequence *s = (Yc_MySequence *) odr_malloc(encode, sizeof(*s));
     Yc_MySequence *t;
 
     YAZ_CHECK(s);
     s->first = odr_intdup(encode, 12345);
-    s->second = odr_malloc(encode, sizeof(*s->second));
+    s->second = (Odr_oct *) odr_malloc(encode, sizeof(*s->second));
     s->second->buf = (unsigned char *) "hello";
     s->second->len = 5;
     s->second->size = 0;
@@ -72,11 +72,11 @@ void tst_MySequence1(ODR encode, ODR decode)
 void tst_MySequence2(ODR encode, ODR decode)
 {
     int ret;
-    Yc_MySequence *s = odr_malloc(encode, sizeof(*s));
+    Yc_MySequence *s = (Yc_MySequence *) odr_malloc(encode, sizeof(*s));
 
     YAZ_CHECK(s);
     s->first = 0;  /* deliberately miss this .. */
-    s->second = odr_malloc(encode, sizeof(*s->second));
+    s->second = (Odr_oct *) odr_malloc(encode, sizeof(*s->second));
     s->second->buf = (unsigned char *) "hello";
     s->second->len = 5;
     s->second->size = 0;
@@ -146,6 +146,7 @@ int main(int argc, char **argv)
 /*
  * Local variables:
  * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
  * indent-tabs-mode: nil
  * End:
  * vim: shiftwidth=4 tabstop=8 expandtab