Skip to content

Commit

Permalink
collector_runner: avoid shadowing variable
Browse files Browse the repository at this point in the history
  • Loading branch information
grobian committed Jun 21, 2018
1 parent e82bf5d commit 2d356c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions collector.c
Expand Up @@ -85,11 +85,11 @@ collector_runner(void *s)
logout("%s", metric); \
else { \
size_t len = strlen(metric); \
char *m = malloc(sizeof(char) * len + sizeof(len)); \
if (m != NULL) { \
*((size_t *)m) = len; \
memcpy(m + sizeof(len), metric, len); \
server_send(submission, m, 1); \
char *mtrc = malloc(sizeof(char) * len + sizeof(len)); \
if (mtrc != NULL) { \
*((size_t *)mtrc) = len; \
memcpy(mtrc + sizeof(len), metric, len); \
server_send(submission, mtrc, 1); \
} \
}

Expand Down

0 comments on commit 2d356c1

Please sign in to comment.