Merge pull request #11587 from dmaziec1/ATCmdParser_doxygen_scanf

ATCmdParser doxygen header's documentation update for scanf
pull/11614/head
Martin Kojtal 2019-09-30 15:09:13 +02:00 committed by GitHub
commit e4d2053a64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -271,6 +271,9 @@ public:
/**
* Direct scanf on underlying stream
* This function does not itself match whitespace in its format string, so \n is not significant to it.
* It should be used only when certain string is needed or format ends with certain character, otherwise
* it will fill the output with one character.
* @see scanf
*
* @param format Format string to pass to scanf

View File

@ -309,7 +309,6 @@ restart:
if (whole_line_wanted && c != '\n') {
// Don't attempt scanning until we get delimiter if they included it in format
// This allows recv("Foo: %s\n") to work, and not match with just the first character of a string
// (scanf does not itself match whitespace in its format string, so \n is not significant to it)
} else if (response) {
sscanf(_buffer + offset, _buffer, &count);
}