ossp-pkg/l2/l2_stream.c 1.17 -> 1.18
--- l2_stream.c 2001/09/13 11:58:05 1.17
+++ l2_stream.c 2001/09/13 12:35:52 1.18
@@ -128,6 +128,10 @@
va_list ap;
l2_result_t rv;
+ /* argument sanity check */
+ if (st == NULL || level == 0 || fmt == NULL)
+ return L2_ERR_ARG;
+
/* pass-through to va_list-based variant */
va_start(ap, fmt);
rv = l2_stream_vlog(st, level, fmt, ap);
@@ -184,7 +188,7 @@
l2_util_format_t vfmt;
/* argument sanity check */
- if (st == NULL || level == 0 || fmt == NULL || ap == NULL)
+ if (st == NULL || fmt == NULL || ap == NULL)
return L2_ERR_ARG;
/* make sure only a single level is specified */
|
|