From 2422b9429273e9ea7235080ba6feb51d162845c8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 8 Oct 2013 11:08:53 +1100 Subject: [PATCH] DataFlash: prevent valgrind errors from Empty driver --- libraries/DataFlash/DataFlash_Empty.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/DataFlash/DataFlash_Empty.cpp b/libraries/DataFlash/DataFlash_Empty.cpp index bfdd832800..3ad3f073d7 100644 --- a/libraries/DataFlash/DataFlash_Empty.cpp +++ b/libraries/DataFlash/DataFlash_Empty.cpp @@ -70,7 +70,10 @@ void DataFlash_Empty::BlockWrite(uint8_t BufferNum, uint16_t IntPageAdr, bool DataFlash_Empty::BlockRead(uint8_t BufferNum, uint16_t IntPageAdr, void *pBuffer, uint16_t size) -{ return false; } +{ + memset(pBuffer, 0, size); + return false; +} // *** END OF INTERNAL FUNCTIONS ***