OSSP CVS Repository

ossp - Difference in ossp-pkg/var/var.c versions 1.56 and 1.57
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/var/var.c 1.56 -> 1.57

--- var.c        2001/12/17 10:29:43     1.56
+++ var.c        2001/12/17 12:57:46     1.57
@@ -2020,7 +2020,7 @@
 
     /* Argument sanity checks */
     if (input_buf == NULL || input_len == 0 ||
-        result == NULL || result_len == NULL ||
+        result == NULL ||
         lookup == NULL)
         return VAR_ERR_INVALID_ARGUMENT;
 
@@ -2060,7 +2060,8 @@
 
         /* Provide results */
         *result = (char *)output.begin;
-        *result_len = output.end - output.begin;
+        if (result_len != NULL)
+            *result_len = output.end - output.begin;
 
         /* canonify all positive answers */
         rc = VAR_OK;
@@ -2068,7 +2069,8 @@
     else {
         /* Provide error results */
         *result = (char *)input_buf;
-        *result_len = output.end - output.begin; /* FIXME */
+        if (result_len != NULL)
+            *result_len = output.end - output.begin;
     }
 
     return rc;

CVSTrac 2.0.1