* Use this function to copy string to logs with fixed sizes (wtmp/utmp. ...)
* where string terminator is optional.
*/
-static inline void *str2memcpy(void *dest, const char *src, size_t n)
+static inline void * __attribute__((nonnull (1)))
+str2memcpy(void *dest, const char *src, size_t n)
{
size_t bytes = strlen(src) + 1;
return dest;
}
-static inline char *mem2strcpy(char *dest, const void *src, size_t n, size_t nmax)
+static inline char * __attribute__((nonnull (1)))
+mem2strcpy(char *dest, const void *src, size_t n, size_t nmax)
{
if (n + 1 > nmax)
n = nmax - 1;