X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=client%2Fadmin.c;h=54167f60f4da46efb9f9797a0f5c1205d3325ab7;hp=14aa2814824a2cb81825a6c6849802ec30919448;hb=7fbf3f2eceeb0978881992fbf1e77cd6fc3c4a9b;hpb=0c46d2e66bdeea1600e700124a81a5d0a65d349e diff --git a/client/admin.c b/client/admin.c index 14aa281..54167f6 100644 --- a/client/admin.c +++ b/client/admin.c @@ -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); }