OSSP CVS Repository

ossp - Difference in ossp-pkg/l2/l2_ch_prefix.c versions 1.8 and 1.9
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/l2/l2_ch_prefix.c 1.8 -> 1.9

--- l2_ch_prefix.c       2001/09/05 13:56:43     1.8
+++ l2_ch_prefix.c       2001/09/06 14:37:53     1.9
@@ -45,7 +45,7 @@
 
     /* allocate private channel configuration */
     if ((cfg = (l2_ch_prefix_t *)malloc(sizeof(l2_ch_prefix_t))) == NULL)
-        return L2_ERROR;
+        return L2_ERR_MEM;
 
     /* initialize configuration with reasonable defaults */
     cfg->timefmt  = NULL;
@@ -73,10 +73,10 @@
     /* argument consistency check */
     if (rv == L2_OK) {
         if (cfg->timezone == NULL)
-            return L2_ERROR;
+            return L2_ERR_ARG;
         if (!(   strcmp(cfg->timezone, "local") == 0 
               || strcmp(cfg->timezone, "utc")   == 0))
-            return L2_ERROR;
+            return L2_ERR_ARG;
     }
 
     return rv;
@@ -105,9 +105,9 @@
         else if (strcmp(cfg->timezone, "utc") == 0)
             tm = gmtime(&t);
         else
-            return L2_ERROR;
+            return L2_ERR_ARG;
         if ((n = strftime(cfg->timebuf, sizeof(cfg->timebuf), cfg->timefmt, tm)) == 0)
-            return L2_ERROR;
+            return L2_ERR_SYS;
         if ((rv = l2_channel_write(downstream, cfg->timebuf, n)) != L2_OK)
             return rv;
     }

CVSTrac 2.0.1