Don't check senentence length less than MINMEA_MAX_SENTENCE_LENGTH in minmea_check

since the whole code base can support any length without problem

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I49184d41154dcc857d0ff630bcab5c62add165de
This commit is contained in:
Xiang Xiao 2022-07-21 12:42:06 +08:00
parent db46128e73
commit 5cecc7a9ab

View File

@ -46,10 +46,6 @@ bool minmea_check(const char *sentence, bool strict)
{ {
uint8_t checksum = 0x00; uint8_t checksum = 0x00;
// Sequence length is limited.
if (strlen(sentence) > MINMEA_MAX_SENTENCE_LENGTH + 3)
return false;
// A valid sentence starts with "$". // A valid sentence starts with "$".
if (*sentence++ != '$') if (*sentence++ != '$')
return false; return false;