diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-09-12 02:05:42 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-09-13 16:20:09 +0200 |
commit | ca93b4a299feaf2ab9344c026b89e5fba360372e (patch) | |
tree | bc3ec6e160fbe1cb86f996445c8b81e172c6403d | |
parent | df072c3b2b20fb7d3d9d50b5ab0df92827aa628f (diff) | |
download | rneovim-ca93b4a299feaf2ab9344c026b89e5fba360372e.tar.gz rneovim-ca93b4a299feaf2ab9344c026b89e5fba360372e.tar.bz2 rneovim-ca93b4a299feaf2ab9344c026b89e5fba360372e.zip |
read_string: Use char if you mean char.
-rw-r--r-- | src/nvim/fileio.c | 6 |
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. |