Browse code

Use size_t where appropriate

John Hawthorn authored on 07/11/2015 09:58:09
Showing 2 changed files

  • choices.c index 25b9217..ba7c31c 100644
  • fzy.c index 5d3bf15..7eb8bd3 100644
... ...
@@ -18,7 +18,7 @@ static int cmpchoice(const void *_idx1, const void *_idx2) {
18 18
 		return -1;
19 19
 }
20 20
 
21
-static void choices_resize(choices_t *c, int new_capacity) {
21
+static void choices_resize(choices_t *c, size_t new_capacity) {
22 22
 	c->strings = realloc(c->strings, new_capacity * sizeof(const char *));
23 23
 
24 24
 	if (!c->strings) {
... ...
@@ -35,7 +35,7 @@ void read_choices(choices_t *c) {
35 35
 }
36 36
 
37 37
 #define SEARCH_SIZE_MAX 4096
38
-int search_size;
38
+size_t search_size;
39 39
 char search[SEARCH_SIZE_MAX + 1] = {0};
40 40
 
41 41
 void clear(tty_t *tty) {