From 17e6d3f3bcd27aedc2ff8fe796ce90dddb04a714 Mon Sep 17 00:00:00 2001 From: Mikhail Lappo Date: Thu, 23 Mar 2017 16:56:50 +0100 Subject: Fixed scanf modifier Scanf expectation is to have same type of pointer to store parsed value and modifier in format string --- updater/updater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/updater/updater.cpp b/updater/updater.cpp index 0693cbd98..c09e267a5 100644 --- a/updater/updater.cpp +++ b/updater/updater.cpp @@ -185,7 +185,7 @@ int main(int argc, char** argv) { // Parse the error code in abort message. // Example: "E30: This package is for bullhead devices." if (!line.empty() && line[0] == 'E') { - if (sscanf(line.c_str(), "E%u: ", &state.error_code) != 1) { + if (sscanf(line.c_str(), "E%d: ", &state.error_code) != 1) { LOG(ERROR) << "Failed to parse error code: [" << line << "]"; } } -- cgit v1.2.3