Use size_t for number of lines in linebuf

.nlines and .capacity are used as array indices and
should therefore be of type size_t.
This commit is contained in:
Jakob Kramer
2015-01-31 20:57:29 +01:00
committed by sin
parent 0934e7f6ed
commit 4769b47dd7
3 changed files with 9 additions and 11 deletions

4
text.h
View File

@@ -2,8 +2,8 @@
struct linebuf {
char **lines;
long nlines;
long capacity;
size_t nlines;
size_t capacity;
};
#define EMPTY_LINEBUF {NULL, 0, 0,}
void getlines(FILE *, struct linebuf *);