summaryrefslogtreecommitdiffstats
path: root/XUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'XUtils.h')
-rw-r--r--XUtils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/XUtils.h b/XUtils.h
index 32bc282d..3703f8bc 100644
--- a/XUtils.h
+++ b/XUtils.h
@@ -117,6 +117,10 @@ ssize_t xReadfileat(openat_arg_t dirfd, const char* pathname, void* buffer, size
ATTR_ACCESS3_R(2, 3)
ssize_t full_write(int fd, const void* buf, size_t count);
+static inline ssize_t full_write_str(int fd, const char* str) {
+ return full_write(fd, str, strlen(str));
+}
+
/* Compares floating point values for ordering data entries. In this function,
NaN is considered "less than" any other floating point value (regardless of
sign), and two NaNs are considered "equal" regardless of payload. */