Minor refactor in tcpip code
[yaz-moved-to-github.git] / client / admin.c
index 14aa281..54167f6 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
  * See the file LICENSE for details.
  */
 #if HAVE_CONFIG_H
@@ -237,9 +237,9 @@ int cmd_adm_import(const char *arg)
                     Z_FragmentSyntax_notExternallyTagged;
                 rec->u.intermediateFragment->u.notExternallyTagged = oct;
 
-                oct->len = oct->size = status.st_size;
-                oct->buf = (unsigned char *) odr_malloc (out, oct->size);
-                if (fread(oct->buf, 1, oct->size, inf) != (size_t) oct->size)
+                oct->len = status.st_size;
+                oct->buf = (char *) odr_malloc (out, oct->len);
+                if (fread(oct->buf, 1, oct->len, inf) != (size_t) oct->len)
                 {
                     printf("Incomplete read of file %s\n", fname);
                 }