NLnetLabs / ldns

LDNS is a DNS library that facilitates DNS tool programming
https://nlnetlabs.nl/ldns
BSD 3-Clause "New" or "Revised" License
292 stars 97 forks source link

host2str.h str2host.h docs missing param[out] annotations #149

Closed aldot closed 2 years ago

aldot commented 2 years ago

Hi!

small doc glitch i thought i could mention.. Ok: $ git grep -c "\[out" ldns/host2wire.h ldns/host2wire.h:21

Not so: $ git grep -c "\[out" ldns/{str2host,host2str}.h $ and hence too many [in] $ git grep -c "\[in" ldns/{str2host,host2str}.h ldns/host2str.h:154 ldns/str2host.h:74

I didn't look at other files. thanks,

aldot commented 2 years ago

sed -i -e 's/param\[in] rd/param[out] rd/' ldns/str2host.h

or, more generally

find * -name "*.h" -exec sed -i -e '/param\[in] .* put /s/param\[in]/param[out]/' {} \+

for starters

wtoorop commented 2 years ago

Thanks. I have addressed the annotation of returning values via parameters at least for constructors in commit c01ce34 I noticed a few more inconsistencies, but will leave them for now as they involve style and not actual semantics.