Remove os_strncpy()

os_strlpcy() should be used instead of os_strncpy() to guarantee null
termination. Since there are no remaining strncpy uses, remove
os_strncpy() definition.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2013-10-26 11:43:28 +03:00
parent 24f051eb14
commit 2f243b804a

View file

@ -360,15 +360,6 @@ int os_strcmp(const char *s1, const char *s2);
*/ */
int os_strncmp(const char *s1, const char *s2, size_t n); int os_strncmp(const char *s1, const char *s2, size_t n);
/**
* os_strncpy - Copy a string
* @dest: Destination
* @src: Source
* @n: Maximum number of characters to copy
* Returns: dest
*/
char * os_strncpy(char *dest, const char *src, size_t n);
/** /**
* os_strstr - Locate a substring * os_strstr - Locate a substring
* @haystack: String (haystack) to search from * @haystack: String (haystack) to search from
@ -465,9 +456,6 @@ char * os_strdup(const char *s);
#ifndef os_strncmp #ifndef os_strncmp
#define os_strncmp(s1, s2, n) strncmp((s1), (s2), (n)) #define os_strncmp(s1, s2, n) strncmp((s1), (s2), (n))
#endif #endif
#ifndef os_strncpy
#define os_strncpy(d, s, n) strncpy((d), (s), (n))
#endif
#ifndef os_strrchr #ifndef os_strrchr
#define os_strrchr(s, c) strrchr((s), (c)) #define os_strrchr(s, c) strrchr((s), (c))
#endif #endif