diff options
author | David Young <dyoung@hdfgroup.org> | 2020-02-11 16:52:48 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-02-12 19:28:33 (GMT) |
commit | 2b7347d5773fc91475ce6a18e0e96b40f0b8cb94 (patch) | |
tree | 5c7bed08103ef343d70f3fecb83f7fe3fe4e109a /src/hlog.c | |
parent | a3e6c35b2d90864b6a561daf58564ad999daac6f (diff) | |
download | hdf5-2b7347d5773fc91475ce6a18e0e96b40f0b8cb94.zip hdf5-2b7347d5773fc91475ce6a18e0e96b40f0b8cb94.tar.gz hdf5-2b7347d5773fc91475ce6a18e0e96b40f0b8cb94.tar.bz2 |
Record the state of a log outlet on first use and reuse that state on
subsequent hlog_fast() calls.
While I'm here, add a typedef, hlog_outlet_t, for struct hlog_outlet, and use
it.
Diffstat (limited to 'src/hlog.c')
-rw-r--r-- | src/hlog.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -261,8 +261,12 @@ hlog_impl(struct hlog_outlet *ls0, const char *fmt, ...) struct hlog_outlet *ls; va_list ap; - if ((ls = hlog_outlet_find_active(ls0)) == NULL) - return; + if ((ls = hlog_outlet_find_active(ls0)) == NULL) { + ls0->ls_resolved = HLOG_OUTLET_S_OFF; + return; + } + + ls0->ls_resolved = HLOG_OUTLET_S_ON; va_start(ap, fmt); vhlog(fmt, ap); |