Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 781eb77a authored by Manoj Prabhu B's avatar Manoj Prabhu B Committed by Gerrit - the friendly Code Review server
Browse files

diag: dci: Prevent using uninitialized variables



Avoid using uninitialized variables by initializing to prevent
invalid behavior.

Change-Id: I5c04874d63f0250b84f4967d48f79e6b4b733bc1
Signed-off-by: default avatarManoj Prabhu B <bmanoj@codeaurora.org>
parent 7076d114
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1825,9 +1825,9 @@ static int diag_dci_process_apps_pkt(struct diag_pkt_header_t *pkt_header,
				     unsigned char *req_buf, int req_len,
				     int tag, int pkt_header_len)
{
	uint8_t cmd_code, subsys_id, i, goto_download = 0;
	uint8_t cmd_code = 0, subsys_id = 0, i, goto_download = 0;
	uint8_t header_len = sizeof(struct diag_dci_pkt_header_t);
	uint16_t ss_cmd_code;
	uint16_t ss_cmd_code = 0;
	uint32_t write_len = 0;
	unsigned char *dest_buf = driver->apps_dci_buf;
	unsigned char *payload_ptr = driver->apps_dci_buf + header_len;