aboutsummaryrefslogtreecommitdiffstats
path: root/libsimple.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2018-08-26 21:55:19 +0200
committerMattias Andrée <maandree@kth.se>2018-08-26 21:55:19 +0200
commit923109ac7005d2d9ae3be9b8c0ffbda0a83a6871 (patch)
treeea33b31354c9f369ea4c41c06fd81a5d5389970b /libsimple.h
parentm (diff)
downloadlibsimple-923109ac7005d2d9ae3be9b8c0ffbda0a83a6871.tar.gz
libsimple-923109ac7005d2d9ae3be9b8c0ffbda0a83a6871.tar.bz2
libsimple-923109ac7005d2d9ae3be9b8c0ffbda0a83a6871.tar.xz
m + add tests
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--libsimple.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libsimple.h b/libsimple.h
index 1e27b65..9d63c2c 100644
--- a/libsimple.h
+++ b/libsimple.h
@@ -477,7 +477,7 @@ extern int libsimple_default_failure_exit;
#endif
-#define FREE(PTR) (free(PTR), (PTR) = NULL, 0) /* TODO test */
+#define FREE(PTR) ((void)(free(PTR), (PTR) = NULL)) /* TODO test */
#define CLOSE(FD) libsimple_close(&(FD)) /* TODO test */
@@ -1398,7 +1398,7 @@ int libsimple_multimespec(struct timespec *, const struct timespec *, int);
_LIBSIMPLE_GCC_ONLY(__attribute__((__nonnull__, __warn_unused_result__)))
static inline int
-libsimple_cmptimespec(const struct timespec *__a, const struct timespec *__b) /* TODO test */
+libsimple_cmptimespec(const struct timespec *__a, const struct timespec *__b)
{
if (__a->tv_sec != __b->tv_sec)
return __a->tv_sec < __b->tv_sec ? -1 : +1;
@@ -1432,7 +1432,7 @@ int libsimple_multimeval(struct timeval *, const struct timeval *, int);
_LIBSIMPLE_GCC_ONLY(__attribute__((__nonnull__, __warn_unused_result__)))
static inline int
-libsimple_cmptimeval(const struct timeval *__a, const struct timeval *__b) /* TODO test */
+libsimple_cmptimeval(const struct timeval *__a, const struct timeval *__b)
{
if (__a->tv_sec != __b->tv_sec)
return __a->tv_sec < __b->tv_sec ? -1 : +1;