summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-06-03 11:40:45 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-06-03 13:23:49 +0200
commit652e4ee372e8939f48f69411b6326b237c6d9e4b (patch)
treec201886a4e02b3a4f0470ace05a9bee797e62720
parent95573221d0597951a63fb73b1bd343d2ab5aeee0 (diff)
Better use size_t for malloc_size
...as both malloc and read, to which this is passed, take arguments of type size_t, not unsigned Change-Id: I2b114c4e67bc9317d908d613fda607a12cf22579 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135347 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--soltools/mkdepend/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c
index b8b84b453476..58633c830115 100644
--- a/soltools/mkdepend/main.c
+++ b/soltools/mkdepend/main.c
@@ -473,7 +473,7 @@ struct filepointer *getfile(char *file)
struct stat st;
off_t size_backup;
ssize_t bytes_read;
- unsigned malloc_size;
+ size_t malloc_size;
content = (struct filepointer *)malloc(sizeof(struct filepointer));
if ((fd = open(file, O_RDONLY)) < 0) {
@@ -486,7 +486,7 @@ struct filepointer *getfile(char *file)
size_backup = st.st_size;
malloc_size = size_backup;
- /* Since off_t usually is larger than unsigned, need to test for
+ /* Since off_t usually is larger than size_t, need to test for
* truncation.
*/
if ( (off_t)malloc_size != size_backup )