[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] NULL-handling problem with libsvn_subr/config

From: Marcus Comstedt <marcus_at_mc.pp.se>
Date: 2003-02-28 17:00:21 CET

Greg Hudson <ghudson@MIT.EDU> writes:

> We should never ever add null pointer handling to a function without
> explicitly noting in its doc string that it handles null pointers.
>
> And we shouldn't do it at all unless it makes things significantly more
> convenient, which in this case it doesn't. So I prefer the session.c
> patch.

Ok. Here it is again, with all TABs replaced with spaces to make Mike
happy, courtesy of M-x untabify...

Index: subversion/libsvn_ra_dav/session.c
===================================================================
--- subversion/libsvn_ra_dav/session.c (revision 5152)
+++ subversion/libsvn_ra_dav/session.c (working copy)
@@ -176,8 +176,12 @@
                      SVN_CONFIG_OPTION_NEON_DEBUG_MASK, NULL);
     }
 
- server_group = svn_config_find_group(cfg, requested_host,
- SVN_CONFIG_SECTION_GROUPS,
pool);
+ if (cfg)
+ server_group = svn_config_find_group(cfg, requested_host,
+ SVN_CONFIG_SECTION_GROUPS,
pool);
+ else
+ server_group = NULL;
+
   if (server_group)
     {
       svn_config_get(cfg, proxy_host, server_group,

  // Marcus

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 28 17:04:05 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.