diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2002-06-05 19:27:51 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2002-06-05 19:27:51 +0000 |
commit | c5edda28fab13cd9cb2c7f51c2f520c5ce859d81 (patch) | |
tree | 3942741770509a615c25ead41a024c8d96c53119 /include/unistd.h | |
parent | 4f08339035a7245eb7d769f923b0201bea1c39d3 (diff) |
Use attribute((sentinel)) on functions where it makes sense.
(this will warn if they are used without a terminating NULL pointer.
Note *pointer*, very useful for arches where 0 != (void *)0, in size)
okay millert@
Diffstat (limited to 'include/unistd.h')
-rw-r--r-- | include/unistd.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/unistd.h b/include/unistd.h index 394b5221ca5..0611959601d 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: unistd.h,v 1.37 2002/02/17 19:42:21 millert Exp $ */ +/* $OpenBSD: unistd.h,v 1.38 2002/06/05 19:27:50 espie Exp $ */ /* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */ /*- @@ -66,9 +66,12 @@ size_t confstr(int, char *, size_t); char *cuserid(char *); int dup(int); int dup2(int, int); -int execl(const char *, const char *, ...); -int execle(const char *, const char *, ...); -int execlp(const char *, const char *, ...); +int execl(const char *, const char *, ...) + __attribute__((sentinel)); +int execle(const char *, const char *, ...) + __attribute__((sentinel)); +int execlp(const char *, const char *, ...) + __attribute__((sentinel)); int execv(const char *, char * const *); int execve(const char *, char * const *, char * const *); int execvp(const char *, char * const *); |