summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6984fad)
raw | patch | inline | side by side (parent: 6984fad)
author | Aleksei Zakharov <zakharov.a.g@yandex.ru> | |
Wed, 11 Oct 2017 17:26:24 +0000 (17:26 +0000) | ||
committer | Aleksei Zakharov <zakharov.a.g@yandex.ru> | |
Wed, 11 Oct 2017 17:26:24 +0000 (17:26 +0000) |
src/ceph.c | patch | blob | history |
diff --git a/src/ceph.c b/src/ceph.c
index f7c9772328906c84c3aca782d58f8f5642aaae3b..421c7eff9dbe60eafe6e42c896a317f580699bdf 100644 (file)
--- a/src/ceph.c
+++ b/src/ceph.c
return 0;
}
-static int cut_suffix(char new_str[], size_t new_str_len, char const *str, char const *suffix) {
+static int cut_suffix(char new_str[], size_t new_str_len, char const *str,
+ char const *suffix) {
- size_t str_len = strlen (str);
- size_t suffix_len = strlen (suffix);
+ size_t str_len = strlen(str);
+ size_t suffix_len = strlen(suffix);
size_t offset = str_len - suffix_len + 1;
offset = new_str_len;
}
- sstrncpy(new_str,str,offset);
+ sstrncpy(new_str, str, offset);
return 0;
}
if (buffer == NULL || buffer_size == 0 || key_str == NULL ||
strlen(key_str) == 0)
return EINVAL;
-/* Strip suffix if it is ".type" or one of latency metric suffix. */
+ /* Strip suffix if it is ".type" or one of latency metric suffix. */
if (count_parts(key_str) > 2) {
if (has_suffix(key_str, ".type")) {
cut_suffix(tmp, tmp_size, key_str, ".type");