On Thu, Apr 02, 2026 at 12:08:04AM +1000, Seth McDonald wrote:
On Wed, 01 Apr 2026 at 12:38:11 +0200, Oswald Buddenhagen wrote:
> For now, use assertions to ensure no such object creation fails.
> yeah, that's just ugly.
just swap the two patches.

Just to clarify, you're referring to patches 3 and 4?

yes.

Also, I will note that after patch 4, there is still an assert() for
'query'.  I left it in because I didn't think adding a no-fail wrapper
for CFDictionaryCreate() was as useful as the other wrappers.  Mainly
because it can reasonably fail for reasons other than OOM, such as
invalid arguments.  Though if that isn't a concern, then I can replace
that assert() as well.

yeah, the assert has to go. asserts are no valid way to guard against external error conditions like resource shortages.

technically, malloc can fail due to an invalid argument as well. but i think it's ok to pretend that it's always oom - if it fails for an obviously different reason, one would investigate it just like a failed assert.

indeed, a wrapper doesn't make much sense here. just inline the error handling.

> search_macos_keychain( const char *host, const char *user )
> {
> -  void *password_data;
> +  CFDictionaryRef query;
> please localize the declarations more consistently.

I'm unsure what you mean here.

i mean merging the declaration into the first assignment, or putting it as close before it as reasonably possible.

ah, one thing i forgot to mention previously:
[PATCH 3/4] Remove use of deprecated SecKeychain API

i think it would be better to say "replace".


_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to