Re: ftp: avoid casts in networking functions

2016-08-22 Thread Jeremie Courreges-Anglas
"Todd C. Miller" writes: > On Sun, 21 Aug 2016 14:23:33 -0600, "Todd C. Miller" wrote: > >> We could get rid of struct sockinet entirely but I wasn't sure > it > was worth it. > > Here's a diff that replaces sockunion with the more common > sockaddr_union. ok jca@ -- jca | PGP : 0x1524E7EE / 5

Re: ftp: avoid casts in networking functions

2016-08-21 Thread Todd C. Miller
On Sun, 21 Aug 2016 14:23:33 -0600, "Todd C. Miller" wrote: > We could get rid of struct sockinet entirely but I wasn't sure it > was worth it. Here's a diff that replaces sockunion with the more common sockaddr_union. - todd Index: usr.bin/ftp/ftp.c ===

ftp: avoid casts in networking functions

2016-08-21 Thread Todd C. Miller
This adds struct sockaddr to sockunion so we can just use &foo.su_sa instead of (struct sockaddr *)&foo. No functional difference but it lets the compiler warn when appropriate. The diff also sync the types in struct sockinet to match the first three fields of struct sockaddr_in. We could get ri