diff options
author | Mark Doffman <mark.doffman@codethink.co.uk> | 2014-03-27 20:50:21 +0000 |
---|---|---|
committer | Mark Doffman <mark.doffman@codethink.co.uk> | 2014-03-27 20:50:21 +0000 |
commit | 68ff94340891f1ae4ea24546acdbbc39c4dcbcd0 (patch) | |
tree | 46f02cba671bcb321482c7961acd91aeee57ced5 /girepository/cmph/chd.c | |
parent | 19da3f81593614198206c45527f973a22cdd621e (diff) | |
parent | 89e84d06dffbc732bac26a105244b7270c42e3ec (diff) | |
download | gobject-introspection-68ff94340891f1ae4ea24546acdbbc39c4dcbcd0.tar.gz |
Merge tag 'GOBJECT_INTROSPECTION_1_39_90' into baserock/markdoffman/1_39_90-mergebaserock/markdoffman/1_39_90-merge
Tag 1_39_90
Conflicts:
autogen.sh
configure.ac
Diffstat (limited to 'girepository/cmph/chd.c')
-rw-r--r-- | girepository/cmph/chd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/girepository/cmph/chd.c b/girepository/cmph/chd.c index 71579ee3..46aec52d 100644 --- a/girepository/cmph/chd.c +++ b/girepository/cmph/chd.c @@ -190,9 +190,10 @@ void chd_load(FILE *fd, cmph_t *mphf) DEBUGP("Loading Compressed rank structure, which has %u bytes\n", chd->packed_cr_size); chd->packed_cr = (cmph_uint8 *) calloc((size_t)chd->packed_cr_size, (size_t)1); nbytes = fread(chd->packed_cr, chd->packed_cr_size, (size_t)1, fd); - if (nbytes == 0 && ferror(fd)) { + if (nbytes == 0 && ferror(fd)) { fprintf(stderr, "ERROR: %s\n", strerror(errno)); } + } int chd_dump(cmph_t *mphf, FILE *fd) @@ -207,13 +208,14 @@ int chd_dump(cmph_t *mphf, FILE *fd) nbytes = fwrite(&data->packed_chd_phf_size, sizeof(cmph_uint32), (size_t)1, fd); nbytes = fwrite(data->packed_chd_phf, data->packed_chd_phf_size, (size_t)1, fd); - DEBUGP("Dumping compressed rank structure with %u bytes to disk\n", buflen); + DEBUGP("Dumping compressed rank structure with %u bytes to disk\n", data->packed_cr_size); nbytes = fwrite(&data->packed_cr_size, sizeof(cmph_uint32), (size_t)1, fd); nbytes = fwrite(data->packed_cr, data->packed_cr_size, (size_t)1, fd); - if (nbytes == 0 && ferror(fd)) { + if (nbytes == 0 && ferror(fd)) { fprintf(stderr, "ERROR: %s\n", strerror(errno)); return 0; } + return 1; } |