aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-09-12 02:05:42 +0200
committerJustin M. Keyes <justinkz@gmail.com>2016-09-13 16:20:09 +0200
commitca93b4a299feaf2ab9344c026b89e5fba360372e (patch)
treebc3ec6e160fbe1cb86f996445c8b81e172c6403d
parentdf072c3b2b20fb7d3d9d50b5ab0df92827aa628f (diff)
downloadrneovim-ca93b4a299feaf2ab9344c026b89e5fba360372e.tar.gz
rneovim-ca93b4a299feaf2ab9344c026b89e5fba360372e.tar.bz2
rneovim-ca93b4a299feaf2ab9344c026b89e5fba360372e.zip
read_string: Use char if you mean char.
-rw-r--r--src/nvim/fileio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 4226f2e8d2..c0d4a71b35 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -4498,16 +4498,16 @@ time_t get8ctime(FILE *fd)
/// @return pointer to the string or NULL when unable to read that many bytes.
char *read_string(FILE *fd, size_t cnt)
{
- uint8_t *str = xmallocz(cnt);
+ char *str = xmallocz(cnt);
for (size_t i = 0; i < cnt; i++) {
int c = getc(fd);
if (c == EOF) {
xfree(str);
return NULL;
}
- str[i] = (uint8_t)c;
+ str[i] = (char)c;
}
- return (char *)str;
+ return str;
}
/// Writes a number to file "fd", most significant bit first, in "len" bytes.