From 6282c859bdc6463cb25734dcfd3cf8628d951088 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Tue, 5 Mar 2013 15:52:44 +0100 Subject: util, manager: and mempset() and use it Just like mempcpy() is almost identical to memcpy() except the useful return value, so is the relation of mempset() to memset(). --- src/shared/util.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/shared') diff --git a/src/shared/util.h b/src/shared/util.h index 04c9fcd71e..f0dfe19ad4 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -594,3 +594,8 @@ int search_and_fopen_nulstr(const char *path, const char *mode, const char *sear } else if (ignore_file((de)->d_name)) \ continue; \ else + +static inline void *mempset(void *s, int c, size_t n) { + memset(s, c, n); + return (char*)s + n; +} -- cgit v1.2.3-54-g00ecf