about summary refs log tree commit diff stats
path: root/ignore.c
diff options
context:
space:
mode:
authorRory Bradford <roryrjb@gmail.com>2020-08-10 16:14:07 +0100
committerRory Bradford <roryrjb@gmail.com>2020-08-10 16:14:07 +0100
commitdc4c58dee58d24d582d6d89cc29311652340e46a (patch)
treeb7ed3dc6ad1e910c45a22f5c02417191e84fe4de /ignore.c
parentb2f8846c34af5271941d7bddd65fd45fcba6b5a9 (diff)
downloadrf-dc4c58dee58d24d582d6d89cc29311652340e46a.tar.gz
Make calloc types explicit
Signed-off-by: Rory Bradford <roryrjb@gmail.com>
Diffstat (limited to 'ignore.c')
-rw-r--r--ignore.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ignore.c b/ignore.c
index e5e324c..c247692 100644
--- a/ignore.c
+++ b/ignore.c
@@ -21,8 +21,9 @@ struct ignores *init_ignores(char *path) {
 	char *line = NULL;
 	size_t llen = 0;
 	total_size = IGNORE_SIZE;
-	struct ignores *ignores = calloc(sizeof(struct ignores), 1);
-	ignores->list = calloc(sizeof(char *), IGNORE_SIZE);
+	struct ignores *ignores =
+		(struct ignores *)calloc(sizeof(struct ignores), 1);
+	ignores->list = (char **)calloc(sizeof(char *), IGNORE_SIZE);
 	ignores->size = 0;
 
 	while (getline(&line, &llen, ignore) != -1) {
@@ -36,7 +37,7 @@ struct ignores *init_ignores(char *path) {
 		}
 
 		if (strlen(line) > 0) {
-			char *l = calloc(sizeof(char), strlen(line));
+			char *l = (char *)calloc(sizeof(char), strlen(line));
 
 			if (l == NULL) {
 				fprintf(stderr, "calloc\n");
@@ -54,7 +55,7 @@ struct ignores *init_ignores(char *path) {
 			}
 
 			if (i + 1 > total_size) {
-				ignores->list = realloc(
+				ignores->list = (char **)realloc(
 					ignores->list, sizeof(char *) * (total_size + IGNORE_SIZE));
 				total_size += IGNORE_SIZE;
 			}