diff options
Diffstat (limited to 'lib/lib.h')
-rw-r--r-- | lib/lib.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -154,7 +154,7 @@ ssize_t writeall(int fd, void *buf, size_t len); off_t lskip(int fd, off_t offset); int mkpathat(int atfd, char *dir, mode_t lastmode, int flags); struct string_list **splitpath(char *path, struct string_list **list); -char *readfileat(int dirfd, char *name, char *buf, off_t len); +char *readfileat(int dirfd, char *name, char *buf, off_t *len); char *readfile(char *name, char *buf, off_t len); void msleep(long miliseconds); int64_t peek_le(void *ptr, unsigned size); @@ -256,14 +256,14 @@ void names_to_pid(char **names, int (*callback)(pid_t pid, char *name)); pid_t xvforkwrap(pid_t pid); #define XVFORK() xvforkwrap(vfork()) -#define WOULD_EXIT(y, x) { jmp_buf _noexit; \ +#define WOULD_EXIT(y, x) do { jmp_buf _noexit; \ int _noexit_res; \ toys.rebound = &_noexit; \ _noexit_res = setjmp(_noexit); \ if (!_noexit_res) do {x;} while(0); \ toys.rebound = 0; \ y = _noexit_res; \ -} +} while(0); #define NOEXIT(x) WOULD_EXIT(_noexit_res, x) |