]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
remove some useless use of strlen()
authorStefan Fritsch <sf@apache.org>
Tue, 3 Aug 2010 19:49:21 +0000 (19:49 +0000)
committerStefan Fritsch <sf@apache.org>
Tue, 3 Aug 2010 19:49:21 +0000 (19:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@982017 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_rewrite.c
modules/mappers/mod_userdir.c
modules/metadata/mod_usertrack.c

index a1cad924deac807fef7d52d44be1fb7bb0f04976..b37766f94f7f8aad5336a8f51e33e9630eaa221d 100644 (file)
@@ -3385,7 +3385,7 @@ static const char *cmd_rewriterule_setflag(apr_pool_t *p, void *_cfg,
             int status = 0;
 
             cfg->flags |= RULEFLAG_FORCEREDIRECT;
-            if (strlen(val) > 0) {
+            if (*val) {
                 if (strcasecmp(val, "permanent") == 0) {
                     status = HTTP_MOVED_PERMANENTLY;
                 }
index 9c2e456b7d81e740d64373edc4e083321f62d2b5..e396b035f3b45acb09dc0885b29cb5bb74b2f435 100644 (file)
@@ -136,7 +136,7 @@ static const char *set_user_dir(cmd_parms *cmd, void *dummy, const char *arg)
          * 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_parms *cmd, void *dummy, const char *arg)
          * 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;
index 8df944a43070fdba99f5cea096f3de8f4cafe4a3..c626587c57f501da60638cd54f1572b32a100a4e 100644 (file)
@@ -380,7 +380,7 @@ static const char *set_cookie_domain(cmd_parms *cmd, void *mconfig,
     /*
      * Apply the restrictions on cookie domain attributes.
      */
-    if (strlen(name) == 0) {
+    if (!name[0]) {
         return "CookieDomain values may not be null";
     }
     if (name[0] != '.') {