OSSP CVS Repository

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

ossp-pkg/var/var_test.c 1.1 -> 1.2

--- var_test.c   2001/11/13 12:08:30     1.1
+++ var_test.c   2001/11/13 12:46:50     1.2
@@ -4,15 +4,17 @@
 #include "var.h"
 
 int env_lookup(void* context,
-          const char* varname, size_t name_len,
-          const char** data, size_t* data_len, size_t* buffer_size)
+               const char* varname, size_t name_len,
+               const char** data, size_t* data_len, size_t* buffer_size)
     {
     char tmp[256];
 
     if (name_len > sizeof(tmp)-1)
         {
-        printf("Callback can't expand variable names longer than %d characters.\n", sizeof(tmp-1));
-        exit(1);
+        /* Callback can't expand variable names longer than
+           sizeof(tmp) characters. */
+
+        return VAR_CALLBACK_ERROR;
         }
     memcpy(tmp, varname, name_len);
     tmp[name_len] = '\0';

CVSTrac 2.0.1