diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/Makefile | 2 | ||||
-rw-r--r-- | misc/regexp.h | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/misc/Makefile b/misc/Makefile index 7975964471..842f9839bb 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -48,7 +48,7 @@ routines := brk sbrk sstk ioctl \ ptrace \ fstab mntent mntent_r \ utimes \ - truncate ftruncate \ + truncate ftruncate truncate64 ftruncate64 \ chflags fchflags \ insremque getttyent getusershell getpass ttyslot \ syslog syscall daemon \ diff --git a/misc/regexp.h b/misc/regexp.h index 384001366e..c2633eb8da 100644 --- a/misc/regexp.h +++ b/misc/regexp.h @@ -98,7 +98,7 @@ extern char *locs; This function cannot be defined in the libc itself since it depends on the macros. */ char * -compile (char *__instring, char *__expbuf, __const char *__endbuf, int __eof) +compile (char *instring, char *expbuf, __const char *endbuf, int eof) { char *__input_buffer = NULL; size_t __input_size = 0; @@ -118,19 +118,19 @@ compile (char *__instring, char *__expbuf, __const char *__endbuf, int __eof) this really proofs to be wrong. */ const size_t __req = 8; # endif - __expbuf += __req; - __expbuf -= (__expbuf - ((char *) 0)) % __req; - if (__endbuf < __expbuf + sizeof (regex_t)) + expbuf += __req; + expbuf -= (expbuf - ((char *) 0)) % __req; + if (endbuf < expbuf + sizeof (regex_t)) { ERROR (50); } - __expr_ptr = (regex_t *) __expbuf; + __expr_ptr = (regex_t *) expbuf; /* The remaining space in the buffer can be used for the compiled pattern. */ - __expr_ptr->buffer = __expbuf + sizeof (regex_t); - __expr_ptr->allocated = __endbuf - (char *) __expr_ptr->buffer; + __expr_ptr->buffer = expbuf + sizeof (regex_t); + __expr_ptr->allocated = endbuf - (char *) __expr_ptr->buffer; - while ((__ch = (GETC ())) != __eof) + while ((__ch = (GETC ())) != eof) { if (__ch == '\0' || __ch == 'n') { |