OSSP CVS Repository

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

Check-in Number: 480
Date: 2001-May-21 22:15:11 (local)
2001-May-21 20:15:11 (UTC)
User:rse
Branch:
Comment: Simplify the file handler, because a NULL ctx cannot happen at all.
Tickets:
Inspections:
Files:
ossp-pkg/l2/l2_ch_file.c      1.3 -> 1.4     0 inserted, 10 deleted

ossp-pkg/l2/l2_ch_file.c 1.3 -> 1.4

--- l2_ch_file.c 2001/05/19 20:14:15     1.3
+++ l2_ch_file.c 2001/05/21 20:15:11     1.4
@@ -71,8 +71,6 @@
     l2_error_t rv;
 
     /* parameter checks */
-    if (ctx == NULL)
-        return L2_ERROR;
     if ((cfg = (l2_ch_file_t *)ctx->vp) == NULL)
         return L2_ERROR;
 
@@ -93,8 +91,6 @@
     int mode;
 
     /* parameter checks */
-    if (ctx == NULL)
-        return L2_ERROR;
     if ((cfg = (l2_ch_file_t *)ctx->vp) == NULL)
         return L2_ERROR;
     if (cfg->path == NULL)
@@ -122,8 +118,6 @@
     l2_ch_file_t *cfg;
 
     /* parameter checks */
-    if (ctx == NULL)
-        return L2_ERROR;
     if ((cfg = (l2_ch_file_t *)ctx->vp) == NULL)
         return L2_ERROR;
     if (cfg->fd == -1)
@@ -165,8 +159,6 @@
             return L2_ERROR;
 
     /* parameter checks */
-    if (ctx == NULL)
-        return L2_ERROR;
     if ((cfg = (l2_ch_file_t *)ctx->vp) == NULL)
         return L2_ERROR;
     if (cfg->fd == -1)
@@ -183,8 +175,6 @@
 static int hook_destroy(l2_context_t *ctx)
 {
     /* parameter checks */
-    if (ctx == NULL)
-        return L2_ERROR;
     if (ctx->vp == NULL) 
         return L2_ERROR;
 

CVSTrac 2.0.1