From cde133c1eed698b4e4acb19cc9571f3d5466cb0b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wolfgang=20St=C3=B6ggl?= Date: Thu, 10 Jan 2019 14:39:37 +0100 Subject: [PATCH] Remove function substring from rrd_graph.c - The function substring is not used any more. This was a leftover from https://github.com/oetiker/rrdtool-1.x/commit/cd4a728 - Fixes rrd_graph.c:6159:7: warning: no previous prototype for 'substring' [-Wmissing-prototypes] --- src/rrd_graph.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/rrd_graph.c b/src/rrd_graph.c index cdff5ea3..8a6be0d7 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -6156,24 +6156,6 @@ void time_clean( result[jj] = '\0'; /* We must force the end of the string */ } -char *substring(const char *string, int position, int length) -{ - char *pointer; - - pointer = malloc(length+1); - - if (pointer == NULL) - { - printf("Unable to allocate memory.\n"); - exit(1); - } - - strncpy(pointer, (string+position), length); - *(pointer+length+1) = '\0'; - - return pointer; -} - image_title_t graph_title_split( const char *title) { -- 2.47.2