diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-07-16 13:52:16 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-07-16 13:52:16 +0100 |
| commit | 09fcffa01669ee9f146c6c0e86be0f26b6dcd165 (patch) | |
| tree | c6d40b207ca468f1f337d53d3e517995817e390c /src/lib/util.cc | |
| parent | 2f25d1608356bf124e502c6aa438ec664c53de80 (diff) | |
Small bits of tidying up.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 305aae4f8..ec99b2f89 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -119,12 +119,6 @@ seconds_to_hms (int s) return hms.str (); } -string -time_to_hms (Time t) -{ - return seconds_to_hms (t / TIME_HZ); -} - /** @param s Number of seconds. * @return String containing an approximate description of s (e.g. "about 2 hours") */ @@ -207,15 +201,11 @@ void stacktrace (ostream& out, int levels) { void *array[200]; - size_t size; - char **strings; - size_t i; - - size = backtrace (array, 200); - strings = backtrace_symbols (array, size); + size_t size = backtrace (array, 200); + char** strings = backtrace_symbols (array, size); if (strings) { - for (i = 0; i < size && (levels == 0 || i < size_t(levels)); i++) { + for (size_t i = 0; i < size && (levels == 0 || i < size_t(levels)); i++) { out << N_(" ") << demangle (strings[i]) << "\n"; } @@ -565,12 +555,6 @@ stride_round_up (int c, int const * stride, int t) return a - (a % t); } -int -stride_lookup (int c, int const * stride) -{ - return stride[c]; -} - /** Read a sequence of key / value pairs from a text stream; * the keys are the first words on the line, and the values are * the remainder of the line following the key. Lines beginning |
