On 2024/01/24 08:51:06 +0100, Philipp <phil...@bureaucracy.de> wrote: > [2024-01-24 00:09] Omar Polo <o...@omarpolo.com> > > [...] > > if you're interested in this however, we can also avoid the strdup() > > here since aldap_parse_url() already strdup()s the string for parsing > > (but still frees the passed argument...) > > I have written two patches for this, one adding the free and one to > avoid the unnecessary strdup. > > Ass you might guess from the filenames, there are a few more patches. I'll > send the rest after I have tested all my patches.
They all read fine to me. only one nitpick in the first one > From fa4cdb0a74c3b5d17cdc93b6285d765fda084740 Mon Sep 17 00:00:00 2001 > From: Philipp Takacs <phil...@bureaucracy.de> > Date: Wed, 24 Jan 2024 01:16:56 +0100 > Subject: [PATCH 11/11] table-ldap aldap_parse_url now saves the port as string > [...] > --- a/extras/tables/table-ldap/table_ldap.c > +++ b/extras/tables/table-ldap/table_ldap.c > @@ -118,7 +118,6 @@ ldap_connect(const char *addr) > { > struct aldap_url lu; > struct addrinfo hints, *res0, *res; > - char port[32]; > int error, r, fd = -1; Here you could remove `r' too since it becomes unused. If you've tested, I could commit my getaddrinfo() diff, then if you rebase these one on top of it I could merge them. (but it's also fine to get the ldaps one in first, depending on how you prefer.) Thanks, Omar Polo