[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 3103 - trunk/subversion/include trunk/subversion/libsvn_wc trunk/subversion/libsvn_subr trunk/subversion/mod_dav_svn trunk/subversion/clients/cmdline

From: Sander Striker <striker_at_apache.org>
Date: 2002-08-30 10:34:05 CEST

> From: kfogel@tigris.org [mailto:kfogel@tigris.org]
> Sent: 30 August 2002 08:51

> Author: kfogel
> Date: 2002-08-30 01:51:15 -0500 (Fri, 30 Aug 2002)
> New Revision: 3103

[...]
> Modified: trunk/subversion/libsvn_subr/validate.c
> ==============================================================================
> --- trunk/subversion/libsvn_subr/validate.c (original)
> +++ trunk/subversion/libsvn_subr/validate.c Fri Aug 30 01:51:19 2002

> @@ -59,6 +59,17 @@
> }
>
> return SVN_NO_ERROR;
> +}
> +
> +
> +svn_boolean_t
> +svn_mime_type_is_binary (const char *mime_type)
> +{
> + return (! ( (mime_type[0] == 't')
> + && (mime_type[1] == 'e')
> + && (mime_type[2] == 'x')
> + && (mime_type[3] == 't')
> + && (mime_type[4] == '/')));
> }

Why not use strncmp? And, is mime_type guaranteed to have at least
5 characters?

Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 30 10:23:49 2002

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.