target: align switch and case statements
The coding style requires the 'case' to be at the same indentation level of its 'switch' statement. Align the code accordingly. While there: - add space around the operators; - drop useless empty line. Skip all riscv code, as it is going to be updated soon from the external fork. No changes are reported by git log -p -w --ignore-blank-lines --patience Change-Id: I2691dfdd2b6734143e14160b46183623e9773539 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9051 Tested-by: jenkins
This commit is contained in:
@@ -815,36 +815,35 @@ static int image_mot_buffer_complete_inner(struct image *image,
|
||||
}
|
||||
} else if (record_type >= 1 && record_type <= 3) {
|
||||
switch (record_type) {
|
||||
case 1:
|
||||
/* S1 - 16 bit address data record */
|
||||
sscanf(&lpsz_line[bytes_read], "%4" SCNx32, &address);
|
||||
cal_checksum += (uint8_t)(address >> 8);
|
||||
cal_checksum += (uint8_t)address;
|
||||
bytes_read += 4;
|
||||
count -= 2;
|
||||
break;
|
||||
case 1:
|
||||
/* S1 - 16 bit address data record */
|
||||
sscanf(&lpsz_line[bytes_read], "%4" SCNx32, &address);
|
||||
cal_checksum += (uint8_t)(address >> 8);
|
||||
cal_checksum += (uint8_t)address;
|
||||
bytes_read += 4;
|
||||
count -= 2;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
/* S2 - 24 bit address data record */
|
||||
sscanf(&lpsz_line[bytes_read], "%6" SCNx32, &address);
|
||||
cal_checksum += (uint8_t)(address >> 16);
|
||||
cal_checksum += (uint8_t)(address >> 8);
|
||||
cal_checksum += (uint8_t)address;
|
||||
bytes_read += 6;
|
||||
count -= 3;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
/* S3 - 32 bit address data record */
|
||||
sscanf(&lpsz_line[bytes_read], "%8" SCNx32, &address);
|
||||
cal_checksum += (uint8_t)(address >> 24);
|
||||
cal_checksum += (uint8_t)(address >> 16);
|
||||
cal_checksum += (uint8_t)(address >> 8);
|
||||
cal_checksum += (uint8_t)address;
|
||||
bytes_read += 8;
|
||||
count -= 4;
|
||||
break;
|
||||
case 2:
|
||||
/* S2 - 24 bit address data record */
|
||||
sscanf(&lpsz_line[bytes_read], "%6" SCNx32, &address);
|
||||
cal_checksum += (uint8_t)(address >> 16);
|
||||
cal_checksum += (uint8_t)(address >> 8);
|
||||
cal_checksum += (uint8_t)address;
|
||||
bytes_read += 6;
|
||||
count -= 3;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
/* S3 - 32 bit address data record */
|
||||
sscanf(&lpsz_line[bytes_read], "%8" SCNx32, &address);
|
||||
cal_checksum += (uint8_t)(address >> 24);
|
||||
cal_checksum += (uint8_t)(address >> 16);
|
||||
cal_checksum += (uint8_t)(address >> 8);
|
||||
cal_checksum += (uint8_t)address;
|
||||
bytes_read += 8;
|
||||
count -= 4;
|
||||
break;
|
||||
}
|
||||
|
||||
if (full_address != address) {
|
||||
|
||||
Reference in New Issue
Block a user