Don't add integers to void pointers.
This commit is contained in:
parent
4e8c80e977
commit
4c86f66f52
@ -74,7 +74,8 @@ fgetws(wchar_t * __restrict ws, int n, FILE * __restrict fp)
|
|||||||
* after the null.
|
* after the null.
|
||||||
*/
|
*/
|
||||||
nconv++;
|
nconv++;
|
||||||
src = memchr(fp->_p, '\0', fp->_r) + 1;
|
src = memchr(fp->_p, '\0', fp->_r);
|
||||||
|
src++;
|
||||||
}
|
}
|
||||||
fp->_r -= (unsigned char *)src - fp->_p;
|
fp->_r -= (unsigned char *)src - fp->_p;
|
||||||
fp->_p = (unsigned char *)src;
|
fp->_p = (unsigned char *)src;
|
||||||
|
@ -166,10 +166,12 @@ main(int argc, char *argv[])
|
|||||||
p++;
|
p++;
|
||||||
} else if (!all) {
|
} else if (!all) {
|
||||||
/* Skip the first line, since it is probably incomplete. */
|
/* Skip the first line, since it is probably incomplete. */
|
||||||
p = memchr(p, '\n', ep - p) + 1;
|
p = memchr(p, '\n', ep - p);
|
||||||
|
p++;
|
||||||
}
|
}
|
||||||
for (; p < ep; p = nextp) {
|
for (; p < ep; p = nextp) {
|
||||||
nextp = memchr(p, '\n', ep - p) + 1;
|
nextp = memchr(p, '\n', ep - p);
|
||||||
|
nextp++;
|
||||||
|
|
||||||
/* Skip ^<[0-9]+> syslog sequences. */
|
/* Skip ^<[0-9]+> syslog sequences. */
|
||||||
if (*p == '<') {
|
if (*p == '<') {
|
||||||
|
Loading…
Reference in New Issue
Block a user