stsp_at_tigris.org writes:
> Log:
> * subversion/libsvn_subr/simple_providers.c:
> (svn_auth__simple_save_creds_helper): Test a pointer pointing
> to a boolean against NULL explicitly. The code as written made
> it relatively easy to confuse the pointer with the boolean itself.
> No functional change.
+1 on this change, but just a heads up, stsp: I'm planning to rewrite
that code to use a plain boolean (instead of a pointer to boolean), for
simplicity. You can see how it will look by examining:
http://subversion.tigris.org/nonav/issues/showattachment.cgi/907/2489-patch-v5.txt
which has similar code (e.g., same variable names) in another file.
(I don't want to change simple_providers.c until I've committed the
above patch, which is undergoing 'make check' right now.)
-Karl
> --- trunk/subversion/libsvn_subr/simple_providers.c (r32082)
> +++ trunk/subversion/libsvn_subr/simple_providers.c (r32083)
> @@ -291,7 +291,7 @@ svn_auth__simple_save_creds_helper(svn_b
> cached_answer = apr_hash_get(b->plaintext_answers,
> realmstring,
> APR_HASH_KEY_STRING);
> - if (cached_answer)
> + if (cached_answer != NULL)
> may_save_password = *cached_answer;
> else
> {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-15 17:39:39 CEST