diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-06-17 04:38:12 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-06-17 04:38:12 -0400 |
commit | 607cdcca3ec69f74245b06cbb147e2435360d190 (patch) | |
tree | 766be1d9c7d14055ec58a45e79de9bc49bd04915 /hex.c | |
parent | fd954cbf588c9a99ad21be16ca80739f58ba465b (diff) | |
download | gpsd-607cdcca3ec69f74245b06cbb147e2435360d190.tar.gz |
Elimination of gpsd_hexdump_level.
The few gpsd_hexdump() calls left have explicit guards.
Diffstat (limited to 'hex.c')
-rw-r--r-- | hex.c | 19 |
1 files changed, 0 insertions, 19 deletions
@@ -6,25 +6,6 @@ #include "gpsd.h" -int gpsd_hexdump_level = -1; -/* - * A wrapper around gpsd_hexdump to prevent wasting cpu time by hexdumping - * buffers and copying strings that will never be printed. only messages at - * level "N" and lower will be printed. By way of example, without any -D - * options, gpsd probably won't ever call the real gpsd_hexdump. At -D2, - * LOG_PROG (and higher) won't get to call the real gpsd_hexdump. For high - * speed, chatty protocols, this can save a lot of CPU. - */ -char *gpsd_hexdump_wrapper(const void *binbuf, size_t binbuflen, - int msg_debug_level) -{ -#ifndef SQUELCH_ENABLE - if (msg_debug_level <= gpsd_hexdump_level) - return gpsd_hexdump(binbuf, binbuflen); -#endif /* SQUELCH_ENABLE */ - return ""; -} - char /*@ observer @*/ *gpsd_hexdump(const void *binbuf, size_t binbuflen) { static char hexbuf[MAX_PACKET_LENGTH * 2 + 1]; |