mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-24 19:56:35 +00:00
toolchain: use consistent code style for C code
Most, but not all our C code follows the Linux kernel code style (as documented in Documentation/process/coding-style.rst). Adjust the few places doing differently: - Braces: ..but the preferred way, as shown to us by the prophets Kernighan and Ritchie, is to put the opening brace last on the line - Spaces after keywords: Use a space after (most) keywords Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
parent
9aebf953fb
commit
5fd8dd203a
@ -53,8 +53,7 @@ int main(int argc __attribute__((unused)),
|
|||||||
int l = LINUX_VERSION_CODE & ~0xFF;
|
int l = LINUX_VERSION_CODE & ~0xFF;
|
||||||
int h = KERNEL_VERSION(${HDR_M},${HDR_m},0);
|
int h = KERNEL_VERSION(${HDR_M},${HDR_m},0);
|
||||||
|
|
||||||
if(l != h)
|
if (l != h) {
|
||||||
{
|
|
||||||
printf("Incorrect selection of kernel headers: ");
|
printf("Incorrect selection of kernel headers: ");
|
||||||
printf("expected %d.%d.x, got %d.%d.x\n", ${HDR_M}, ${HDR_m},
|
printf("expected %d.%d.x, got %d.%d.x\n", ${HDR_M}, ${HDR_m},
|
||||||
((LINUX_VERSION_CODE>>16) & 0xFF),
|
((LINUX_VERSION_CODE>>16) & 0xFF),
|
||||||
|
@ -434,7 +434,7 @@ int main(int argc, char **argv)
|
|||||||
/* Both args below can be set at compile/link time
|
/* Both args below can be set at compile/link time
|
||||||
* and are ignored correctly when not used
|
* and are ignored correctly when not used
|
||||||
*/
|
*/
|
||||||
if(i == argc)
|
if (i == argc)
|
||||||
*cur++ = "-fPIE";
|
*cur++ = "-fPIE";
|
||||||
|
|
||||||
if (!found_shared)
|
if (!found_shared)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user