diff options
author | Justus Winter <justus@gnupg.org> | 2017-06-19 21:20:57 +0200 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2017-08-05 18:42:22 +0200 |
commit | 835b293d35a209d38047126443d41fa7090daa4c (patch) | |
tree | 5bf956895e6030f91cd618fb191b2151f6d25423 /pfinet/glue-include/linux/socket.h | |
parent | dc0b5a43224999223a246870912b0f292b1980e9 (diff) | |
download | hurd-835b293d35a209d38047126443d41fa7090daa4c.tar.gz hurd-835b293d35a209d38047126443d41fa7090daa4c.tar.bz2 hurd-835b293d35a209d38047126443d41fa7090daa4c.zip |
Use our own variant of 'assert' and 'assert_perror'.
Our variants print stack traces on failures. This will make locating
errors much easier.
Diffstat (limited to 'pfinet/glue-include/linux/socket.h')
-rw-r--r-- | pfinet/glue-include/linux/socket.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pfinet/glue-include/linux/socket.h b/pfinet/glue-include/linux/socket.h index 057afbdb..a7475eaf 100644 --- a/pfinet/glue-include/linux/socket.h +++ b/pfinet/glue-include/linux/socket.h @@ -111,14 +111,14 @@ extern inline int /* Does not modify IOV. */ memcpy_fromiovecend (unsigned char *kdata, struct iovec *iov, int offset, int len) { - assert (offset + len <= iov->iov_len); + assert_backtrace (offset + len <= iov->iov_len); memcpy (kdata, iov->iov_base + offset, len); return 0; } extern inline int /* Modifies IOV to consume LEN bytes. */ memcpy_fromiovec (unsigned char *kdata, struct iovec *iov, int len) { - assert (len <= iov->iov_len); + assert_backtrace (len <= iov->iov_len); memcpy (kdata, iov->iov_base, len); iov->iov_base += len; iov->iov_len -= len; @@ -127,7 +127,7 @@ memcpy_fromiovec (unsigned char *kdata, struct iovec *iov, int len) extern inline void /* Modifies IOV to consume LEN bytes. */ memcpy_tokerneliovec (struct iovec *iov, unsigned char *kdata, int len) { - assert (len <= iov->iov_len); + assert_backtrace (len <= iov->iov_len); memcpy (iov->iov_base, kdata, len); iov->iov_base += len; iov->iov_len -= len; |