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().
This commit is contained in:
Michal Schmidt
2013-03-13 14:14:13 +01:00
parent 5052495bba
commit 6282c859bd
2 changed files with 9 additions and 8 deletions
+5
View File
@@ -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;
}