K 10 svn:author V 7 asomers K 8 svn:date V 27 2019-09-06T20:16:08.872589Z K 7 svn:log V 1707 MFC r350858-r350859, r350987, r351170 r350858: ping6: Add missing static keyword for a global variable This fixes -Wmissing-variable-declarations error when compiled with WARNS=6. Submitted by: Ján Sučan Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21214 r350859: ping6: Remove unnecessary level of indirection from dnsdecode() parameter The `sp' pointer doesn't need to be modified in the caller of dnsdecode(). This fixes -Wcast-qual error (`must have all intermediate pointers const qualified to be safe') when compiled with WARNS=6. Submitted by: Ján Sučan Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21215 r350987: ping6: Fix data type of a variable for a packet sequence number Submitted by: Ján Sučan Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21218 r351170: ping6: Fix dnsdecode() bug introduced by r350859 Revision 350859 removed level of indirection that was needed for setting the caller's `cp' pointer. dnsdecode() uses return value to indicate error or success. It returns pointer to a buffer holding a decompressed DNS name or NULL. The caller uses that value only to find out the result, not for accessing the buffer. We use the return value to propagate the new value of `cp' pointer to the caller instead of using an output argument. Submitted by: Ján Sučan MFC-With: 350859 Sponsored by: Google, Inc (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21266 END