You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2010/08/03 21:49:22 UTC
svn commit: r982017 - in /httpd/httpd/trunk/modules: mappers/mod_rewrite.c
mappers/mod_userdir.c metadata/mod_usertrack.c
Author: sf
Date: Tue Aug 3 19:49:21 2010
New Revision: 982017
URL: http://svn.apache.org/viewvc?rev=982017&view=rev
Log:
remove some useless use of strlen()
Modified:
httpd/httpd/trunk/modules/mappers/mod_rewrite.c
httpd/httpd/trunk/modules/mappers/mod_userdir.c
httpd/httpd/trunk/modules/metadata/mod_usertrack.c
Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?rev=982017&r1=982016&r2=982017&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Tue Aug 3 19:49:21 2010
@@ -3385,7 +3385,7 @@ static const char *cmd_rewriterule_setfl
int status = 0;
cfg->flags |= RULEFLAG_FORCEREDIRECT;
- if (strlen(val) > 0) {
+ if (*val) {
if (strcasecmp(val, "permanent") == 0) {
status = HTTP_MOVED_PERMANENTLY;
}
Modified: httpd/httpd/trunk/modules/mappers/mod_userdir.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_userdir.c?rev=982017&r1=982016&r2=982017&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_userdir.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_userdir.c Tue Aug 3 19:49:21 2010
@@ -136,7 +136,7 @@ static const char *set_user_dir(cmd_parm
* If there are no usernames specified, this is a global disable - we
* need do no more at this point than record the fact.
*/
- if (strlen(usernames) == 0) {
+ if (!*usernames) {
s_cfg->globally_disabled = 1;
return NULL;
}
@@ -148,7 +148,7 @@ static const char *set_user_dir(cmd_parm
* the "enable" keyword requires the list. Whinge if it doesn't have
* it.
*/
- if (strlen(usernames) == 0) {
+ if (!*usernames) {
return "UserDir \"enable\" keyword requires a list of usernames";
}
usertable = s_cfg->enabled_users;
Modified: httpd/httpd/trunk/modules/metadata/mod_usertrack.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_usertrack.c?rev=982017&r1=982016&r2=982017&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_usertrack.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_usertrack.c Tue Aug 3 19:49:21 2010
@@ -380,7 +380,7 @@ static const char *set_cookie_domain(cmd
/*
* Apply the restrictions on cookie domain attributes.
*/
- if (strlen(name) == 0) {
+ if (!name[0]) {
return "CookieDomain values may not be null";
}
if (name[0] != '.') {