Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
BasedOnStyle: Google
AccessModifierOffset: '-4'
AllowShortBlocksOnASingleLine: 'false'
AllowShortCaseLabelsOnASingleLine: 'false'
AccessModifierOffset: -4
AllowShortBlocksOnASingleLine: 'Never'
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: 'false'
AllowShortLoopsOnASingleLine: 'false'
ColumnLimit: '120'
IndentWidth: '2'
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
ColumnLimit: 120
IndentWidth: 2
PointerAlignment: Left

...
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.10)

project(ccos_disk_tool)

set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED True)

set(SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${SOURCE_DIR})

Expand Down
6 changes: 3 additions & 3 deletions api_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ uint8_t test_inode_data[] = {

int check_image_test() {
uint8_t data[0x200] = {0};
ASSERT(ccos_check_image(data) == 0);
ASSERT(is_image_supported(data) == 1);
data[0] = 'I';
data[1] = 'M';
data[2] = 'D';
data[3] = ' ';
ASSERT(ccos_check_image(data) == -1);
ASSERT(is_image_supported(data) == 0);
memset(data, 0, 0x200);
data[0] = 0xEB;
data[2] = 0x90;
*((uint16_t *)(&data[0x1FE])) = 0xAA55;
ASSERT(ccos_check_image(data) == -1);
ASSERT(is_image_supported(data) == 0);
return 0;
}

Expand Down
Loading