OSSP CVS Repository

ossp - Check-in [1379]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1379
Date: 2001-Nov-20 14:33:53 (local)
2001-Nov-20 13:33:53 (UTC)
User:thl
Branch:
Comment: THLs review
Tickets:
Inspections:
Files:
ossp-pkg/var/var.c      1.31 -> 1.32     23 inserted, 30 deleted

ossp-pkg/var/var.c 1.31 -> 1.32

--- var.c        2001/11/20 12:45:10     1.31
+++ var.c        2001/11/20 13:33:53     1.32
@@ -462,8 +462,7 @@
         if (*p == config->escape) {
             if (p + 1 == end)
                 return VAR_ERR_INCOMPLETE_QUOTED_PAIR;
-            else
-                ++p;
+            ++p;
         }
     }
     return p - begin;
@@ -479,8 +478,7 @@
         if (*p == config->escape) {
             if (p + 1 == end)
                 return VAR_ERR_INCOMPLETE_QUOTED_PAIR;
-            else
-                ++p;
+            ++p;
         }
     }
     return p - begin;
@@ -711,19 +709,19 @@
         rc = exptext(p, end, config);
         if (rc < 0)
             goto error_return;
-        else if (rc > 0) {
+        if (rc > 0) {
             if (!tokenbuf_append(result, p, rc)) {
                 rc = VAR_ERR_OUT_OF_MEMORY;
                 goto error_return;
-            } else
-                p += rc;
+            }
+            p += rc;
         }
 
         rc = variable(p, end, config, nameclass, lookup, lookup_context,
                       force_expand, &tmp);
         if (rc < 0)
             goto error_return;
-        else if (rc > 0) {
+        if (rc > 0) {
             p += rc;
             if (!tokenbuf_append
                 (result, tmp.begin, tmp.end - tmp.begin)) {
@@ -763,19 +761,19 @@
         rc = substext(p, end, config);
         if (rc < 0)
             goto error_return;
-        else if (rc > 0) {
+        if (rc > 0) {
             if (!tokenbuf_append(result, p, rc)) {
                 rc = VAR_ERR_OUT_OF_MEMORY;
                 goto error_return;
-            } else
-                p += rc;
+            }
+            p += rc;
         }
 
         rc = variable(p, end, config, nameclass, lookup, lookup_context,
                       force_expand, &tmp);
         if (rc < 0)
             goto error_return;
-        else if (rc > 0) {
+        if (rc > 0) {
             p += rc;
             if (!tokenbuf_append
                 (result, tmp.begin, tmp.end - tmp.begin)) {
@@ -931,8 +929,8 @@
             if (orig->end - p <= 1) {
                 tokenbuf_free(expanded);
                 return VAR_ERR_INCOMPLETE_QUOTED_PAIR;
-            } else
-                ++p;
+            }
+            ++p;
             if (*p == '\\') {
                 if (!tokenbuf_append(expanded, p, 1)) {
                     tokenbuf_free(expanded);
@@ -1387,44 +1385,39 @@
 
         if (*p != '/')
             return VAR_ERR_MALFORMATTED_REPLACE;
-        else
-            ++p;
+        ++p;
 
         rc = substext_or_variable(p, end, config, nameclass, lookup,
                                   lookup_context, force_expand, &search);
         if (rc < 0)
             goto error_return;
-        else
-            p += rc;
+        p += rc;
 
         if (*p != '/') {
             rc = VAR_ERR_MALFORMATTED_REPLACE;
             goto error_return;
-        } else
-            ++p;
+        }
+        ++p;
 
         rc = substext_or_variable(p, end, config, nameclass, lookup,
                                   lookup_context, force_expand, &replace);
         if (rc < 0)
             goto error_return;
-        else
-            p += rc;
+        p += rc;
 
         if (*p != '/') {
             rc = VAR_ERR_MALFORMATTED_REPLACE;
             goto error_return;
-        } else
-            ++p;
+        }
+        ++p;
 
         rc = exptext(p, end, config);
         if (rc < 0)
             goto error_return;
-        else {
-            flags.begin = p;
-            flags.end = p + rc;
-            flags.buffer_size = 0;
-            p += rc;
-        }
+        flags.begin = p;
+        flags.end = p + rc;
+        flags.buffer_size = 0;
+        p += rc;
 
         if (data->begin) {
             rc = search_and_replace(data, &search, &replace, &flags);

CVSTrac 2.0.1