summaryrefslogtreecommitdiff
path: root/src/shared/util.h
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2013-03-05 15:52:44 +0100
committerMichal Schmidt <mschmidt@redhat.com>2013-03-13 14:14:13 +0100
commit6282c859bdc6463cb25734dcfd3cf8628d951088 (patch)
tree20cff7f2503ecfa017b6c2b3607a74d889223443 /src/shared/util.h
parent5052495bbaf318d132024e75295da2f5d721420c (diff)
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().
Diffstat (limited to 'src/shared/util.h')
-rw-r--r--src/shared/util.h5
1 files changed, 5 insertions, 0 deletions
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;
+}