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

Re: svn commit: rev 1139 - trunk/subversion/include trunk/subversion/libsvn_client trunk/subversion/clients/cmdline trunk/subversion/tests/clients/cmdline

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-02-02 01:47:36 CET

It all looks good. Two comments:

On Fri, Feb 01, 2002 at 04:10:22PM -0600, kfogel@tigris.org wrote:
>...
> +++ NEW/trunk/subversion/clients/cmdline/main.c Fri Feb 1 16:10:22 2002
>...
> +revision_from_word (svn_client_revision_t *revision, const char *word)
> {
> - const char *p;
> -
> - for (p = rev; *p; p++)
> + if (apr_strnatcasecmp (word, "head") == 0)

You're comparing for equality, not sort-ordering. Thus, you should be using
strcasecmp() instead. APR will ensure that function's is prototyped/defined,
presuming apr_general.h is included.

>...
> +valid_revision_number (const char *rev)
> +{
> + while (*rev) {
> + if ((*rev < '0') || (*rev++ > '9'))

#include <apr_lib.h>

then use apr_isdigit()

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
Received on Sat Oct 21 14:37:03 2006

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.