[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tyndur-devel] [PATCH] servmgr: Fix fuer uninitialisierte Variable
! servmgr: Wenn man in buffer_replace die Variable len initialisiert,
laesst sich das dann auch mit -O2 kompilieren.
Signed-off-by: Antoine Kaufmann <toni@xxxxxxxxxx>
---
src/modules/servmgr/config.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/modules/servmgr/config.c b/src/modules/servmgr/config.c
index 0ca4f73..c722e41 100644
--- a/src/modules/servmgr/config.c
+++ b/src/modules/servmgr/config.c
@@ -62,6 +62,7 @@ static void buffer_replace(char** buf, const char* search, const char* replace)
char* new;
int found = 0;
+ len = 0;
for (i = 0; i < strlen(old); i++) {
if (!strncmp(old + i, search, search_len)) {
len += replace_len;
--
1.6.0.6