You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@lyra.org> on 2003/02/03 08:17:59 UTC

Re: svn commit: rev 4700 - in trunk/subversion: include libsvn_client clients/cmdline svnversion

On Sat, Feb 01, 2003 at 01:09:31PM -0600, rooneg@tigris.org wrote:
>...
> +++ trunk/subversion/clients/cmdline/main.c	Sat Feb  1 13:09:21 2003
> @@ -512,6 +512,7 @@
>    int opt_id, err2;
>    apr_getopt_t *os;  
>    svn_cl__opt_state_t opt_state;
> +  svn_client_ctx_t ctx;
>    int received_opts[SVN_OPT_MAX_OPTIONS];
>    int i, num_opts = 0;
>    const svn_opt_subcommand_desc_t *subcommand = NULL;
> @@ -549,7 +550,10 @@
>    memset (&opt_state, 0, sizeof (opt_state));
>    opt_state.start_revision.kind = svn_opt_revision_unspecified;
>    opt_state.end_revision.kind = svn_opt_revision_unspecified;
> -  
> + 
> +  /* Clear out our context. */
> +  memset (&ctx, 0, sizeof (ctx));

Much easier to just do this in the declaration:

  svn_client_ctx_t ctx = { 0 };

(and in svnversion/main.c)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 4700 - in trunk/subversion: include libsvn_client clients/cmdline svnversion

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Greg Stein wrote:

>>+  /* Clear out our context. */
>>+  memset (&ctx, 0, sizeof (ctx));
>>    
>>
>
>Much easier to just do this in the declaration:
>
>  svn_client_ctx_t ctx = { 0 };
>
>(and in svnversion/main.c)
>
>Cheers,
>-g
>

heh, cool.  i'd seen that with array's, but i didn't know you could do 
that with structs.

i'll make the change tonight sometime.

thanks,

-garrett


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org