style: auto-format C/C++ sources with clang-format

This commit is contained in:
Leonmmcoset
2026-04-21 12:45:02 +00:00
committed by github-actions[bot]
parent a25362d3d4
commit 316545e74b
8 changed files with 2145 additions and 2164 deletions

View File

@@ -225,7 +225,8 @@ static int ush_qrcode_build_canvas(const uint8_t qrcode[], u64 module_pixels, u6
for (x = 0ULL; x < side_pixels; x++) {
int qx = (int)(x / module_pixels) - (int)USH_QRCODE_BORDER;
int qy = (int)(y / module_pixels) - (int)USH_QRCODE_BORDER;
int dark = (qx >= 0 && qy >= 0 && qx < qr_size && qy < qr_size && qrcodegen_getModule(qrcode, qx, qy)) ? 1 : 0;
int dark =
(qx >= 0 && qy >= 0 && qx < qr_size && qy < qr_size && qrcodegen_getModule(qrcode, qx, qy)) ? 1 : 0;
ush_qrcode_canvas[y][x] =
(dark != 0) ? (unsigned int)USH_QRCODE_COLOR_DARK : (unsigned int)USH_QRCODE_COLOR_LIGHT;
}
@@ -258,7 +259,8 @@ static int ush_qrcode_emit_pixels(const uint8_t qrcode[]) {
}
ush_zero(&fb_info, (u64)sizeof(fb_info));
if (cleonos_sys_fb_info(&fb_info) == 0ULL || fb_info.width == 0ULL || fb_info.height == 0ULL || fb_info.bpp != 32ULL) {
if (cleonos_sys_fb_info(&fb_info) == 0ULL || fb_info.width == 0ULL || fb_info.height == 0ULL ||
fb_info.bpp != 32ULL) {
ush_writeln("qrcode: framebuffer unavailable, fallback to ascii");
ush_qrcode_emit_ascii(qrcode);
return 1;