Mercurial > dropbear
comparison loginrec.c @ 1254:1ed6f39e8aa4
remove unused loginrec_set_addr()
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 15 Mar 2016 22:04:13 +0800 |
parents | e0084f136cb8 |
children | 83d85b28b353 |
comparison
equal
deleted
inserted
replaced
1253:3b990ddaea4f | 1254:1ed6f39e8aa4 |
---|---|
303 | 303 |
304 li->tv_sec = tv.tv_sec; | 304 li->tv_sec = tv.tv_sec; |
305 li->tv_usec = tv.tv_usec; | 305 li->tv_usec = tv.tv_usec; |
306 } | 306 } |
307 | 307 |
308 /* copy a sockaddr_* into our logininfo */ | |
309 void | |
310 login_set_addr(struct logininfo *li, const struct sockaddr *sa, | |
311 const unsigned int sa_size) | |
312 { | |
313 unsigned int bufsize = sa_size; | |
314 | |
315 /* make sure we don't overrun our union */ | |
316 if (sizeof(li->hostaddr) < sa_size) | |
317 bufsize = sizeof(li->hostaddr); | |
318 | |
319 memcpy((void *)&(li->hostaddr.sa), (const void *)sa, bufsize); | |
320 } | |
321 | |
322 | |
323 /** | 308 /** |
324 ** login_write: Call low-level recording functions based on autoconf | 309 ** login_write: Call low-level recording functions based on autoconf |
325 ** results | 310 ** results |
326 **/ | 311 **/ |
327 int | 312 int |