ceph plugin: Rewrite parse_keys() and compact_ds_name().
authorFlorian Forster <octo@collectd.org>
Mon, 30 Nov 2015 10:25:48 +0000 (11:25 +0100)
committerFlorian Forster <octo@collectd.org>
Mon, 30 Nov 2015 10:26:26 +0000 (11:26 +0100)
commitbb715b67ca90d28ad8b69c08689673a9680271de
treebb5d2db457c3f875267221fc39c2620a061becd9
parenta9f03564aad7917086d9b3f9cdb98a8613eaaf98
ceph plugin: Rewrite parse_keys() and compact_ds_name().

This rewrite removes the logic to add the original length to the end of
the buffer in case of truncation. This logic was guarded by:
  tmp[DATA_MAX_NAME_LEN - 1] = '\0';
  if(strlen(tmp) > DATA_MAX_NAME_LEN - 1) { ... }
and was therefore dead code.

Fixes: #1350
src/ceph.c
src/ceph_test.c