From: Jonathan Dieter Date: Wed, 6 Jun 2018 08:21:54 +0000 (+0300) Subject: Remove unused functions X-Git-Tag: archive/raspbian/1.1.9+ds1-1+rpi1~1^2~242 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6e8edc594e2806bb5cb50e42a379b052792ab5dc;p=zchunk.git Remove unused functions Signed-off-by: Jonathan Dieter --- diff --git a/src/lib/io.c b/src/lib/io.c index e9a70e6..8a3ddca 100644 --- a/src/lib/io.c +++ b/src/lib/io.c @@ -66,26 +66,6 @@ int write_data(int fd, const char *data, size_t length) { return True; } -int write_comp_size(int fd, size_t val) { - char data[sizeof(size_t)*2] = {0}; - size_t length = 0; - compint_from_size(data, val, &length); - return write_data(fd, data, length); -} - -int read_comp_size(int fd, size_t *val, size_t *length) { - char data[MAX_COMP_SIZE] = {0}; - int i=0; - for(char c=read_data(fd, data+i, 1); c < 128 && i < MAX_COMP_SIZE; - i++,c=read_data(fd, data+i, 1)); - if(i == MAX_COMP_SIZE) { - zck_log(ZCK_LOG_ERROR, "Number too large\n"); - *val = 0; - return False; - } - return !compint_to_size(val, data, length, MAX_COMP_SIZE); -} - int seek_data(int fd, off_t offset, int whence) { if(lseek(fd, offset, whence) == -1) { char *wh_str = NULL; diff --git a/src/lib/zck_private.h b/src/lib/zck_private.h index 993fa82..4e4c549 100644 --- a/src/lib/zck_private.h +++ b/src/lib/zck_private.h @@ -222,10 +222,6 @@ ssize_t read_data(int fd, char *data, size_t length) __attribute__ ((warn_unused_result)); int write_data(int fd, const char *data, size_t length) __attribute__ ((warn_unused_result)); -int write_comp_size(int fd, size_t val) - __attribute__ ((warn_unused_result)); -int read_comp_size(int fd, size_t *val, size_t *length) - __attribute__ ((warn_unused_result)); int chunks_from_temp(zckCtx *zck) __attribute__ ((warn_unused_result));