]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Add __must_check annotation for mark_fd_nonblocking() and mark_fd_blocking().
authorAndre Noll <maan@systemlinux.org>
Sat, 19 Jan 2008 12:50:27 +0000 (13:50 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 19 Jan 2008 12:50:27 +0000 (13:50 +0100)
fd.c
fd.h

diff --git a/fd.c b/fd.c
index d90bd1a8c5fda493b0d52b2d02c3db9b1a1fbb52..abad80a86ce368660c1ed3b88a1c0e088488a422 100644 (file)
--- a/fd.c
+++ b/fd.c
@@ -67,7 +67,7 @@ int para_select(int n, fd_set *readfds, fd_set *writefds,
  *
  * \return Standard.
  */
-int mark_fd_blocking(int fd)
+__must_check int mark_fd_blocking(int fd)
 {
        int flags = fcntl(fd, F_GETFL);
        if (flags < 0)
@@ -85,7 +85,7 @@ int mark_fd_blocking(int fd)
  *
  * \return Standard.
  */
-int mark_fd_nonblocking(int fd)
+__must_check int mark_fd_nonblocking(int fd)
 {
        int flags = fcntl(fd, F_GETFL);
        if (flags < 0)
diff --git a/fd.h b/fd.h
index 6e333d91359345e2d26bf02accfe5e2d39419e2d..6472c137e7d0a86007e2161b0f6691740c9f6fe3 100644 (file)
--- a/fd.h
+++ b/fd.h
@@ -9,8 +9,8 @@
 int file_exists(const char *);
 int para_select(int n, fd_set *readfds, fd_set *writefds,
                struct timeval *timeout_tv);
-int mark_fd_nonblocking(int fd);
-int mark_fd_blocking(int fd);
+__must_check int mark_fd_nonblocking(int fd);
+__must_check int mark_fd_blocking(int fd);
 void para_fd_set(int fd, fd_set *fds, int *max_fileno);
 __must_check int para_fgets(char *line, int size, FILE *f);
 void *para_mmap(size_t length, int prot, int flags, int fd, off_t offset);