From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: location@lists.ipfire.org Subject: Re: Warning in '__loc_network_tree_count()' Date: Sat, 04 Mar 2023 11:03:49 +0000 Message-ID: In-Reply-To: <7845ed2c-76c8-df33-7f8a-2bccd8d10c6e@online.no> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7583699720649432219==" List-Id: --===============7583699720649432219== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, > On 4 Mar 2023, at 11:00, Gisle Vanem wrote: >=20 > Michael Tremer wrote: >=20 >>> So shouldn't the function be: >>>=20 >>> static int __loc_network_tree_count(struct loc_network* network, void* da= ta) { >>> size_t* counter =3D (size_t*)data; >>>=20 >>> // Increase the counter for each network >>> (*counter)++; >>> return 0; >> Yes, you are incorrect. I am incrementing the pointer when I wanted to inc= rement the value.=20 >=20 > You mean "you are correct"? >=20 >> Thank you for helping to improve libloc. How does it run on Windows? > I doesn't run at all w/o much patching by myself. I've added > support for it and 'location.db' files in my project Wsock-trace: > https://github.com/gvanem/wsock-trace >=20 > The patched up 'libloc' version: > https://github.com/gvanem/wsock-trace/tree/master/src/Geo-IP/IPFire/src Do you intend to upstream those changes at some point (if that is possible)? >=20 > --=20 > --gv --===============7583699720649432219==--