summaryrefslogtreecommitdiffstats
path: root/compat/fake-rfc2553.c
diff options
context:
space:
mode:
Diffstat (limited to 'compat/fake-rfc2553.c')
-rw-r--r--compat/fake-rfc2553.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/compat/fake-rfc2553.c b/compat/fake-rfc2553.c
index cfe4c39..066f83f 100644
--- a/compat/fake-rfc2553.c
+++ b/compat/fake-rfc2553.c
@@ -43,32 +43,32 @@ TCL_DECLARE_MUTEX(netdbMutex)
static size_t
strlcpy(char *dst, const char *src, size_t siz)
{
- char *d = dst;
- const char *s = src;
- size_t n = siz;
+ char *d = dst;
+ const char *s = src;
+ size_t n = siz;
- /* Copy as many bytes as will fit */
- if (n != 0 && --n != 0) {
- do {
- if ((*d++ = *s++) == 0)
- break;
- } while (--n != 0);
- }
+ /* Copy as many bytes as will fit */
+ if (n != 0 && --n != 0) {
+ do {
+ if ((*d++ = *s++) == 0)
+ break;
+ } while (--n != 0);
+ }
- /* Not enough room in dst, add NUL and traverse rest of src */
- if (n == 0) {
- if (siz != 0)
- *d = '\0'; /* NUL-terminate dst */
- while (*s++)
- ;
- }
+ /* Not enough room in dst, add NUL and traverse rest of src */
+ if (n == 0) {
+ if (siz != 0)
+ *d = '\0'; /* NUL-terminate dst */
+ while (*s++)
+ ;
+ }
- return(s - src - 1); /* count does not include NUL */
+ return(s - src - 1); /* count does not include NUL */
}
#endif
int fake_getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
- size_t hostlen, char *serv, size_t servlen, int flags)
+ size_t hostlen, char *serv, size_t servlen, int flags)
{
struct sockaddr_in *sin = (struct sockaddr_in *)sa;
struct hostent *hp;