mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-14 03:00:34 +08:00
Fix code style for system lib
This commit is contained in:
@@ -77,11 +77,13 @@ warnerr_core(int errcode, const char *fmt, va_list args)
|
||||
vfprintf(stderr, fmt, args);
|
||||
|
||||
/* convenience as many parts of NuttX use negative errno */
|
||||
if (errcode < 0)
|
||||
if (errcode < 0) {
|
||||
errcode = -errcode;
|
||||
}
|
||||
|
||||
if (errcode < NOCODE)
|
||||
if (errcode < NOCODE) {
|
||||
fprintf(stderr, ": %s", strerror(errcode));
|
||||
}
|
||||
|
||||
fprintf(stderr, "\n");
|
||||
#elif CONFIG_ARCH_LOWPUTC
|
||||
@@ -89,11 +91,13 @@ warnerr_core(int errcode, const char *fmt, va_list args)
|
||||
lowvsyslog(fmt, args);
|
||||
|
||||
/* convenience as many parts of NuttX use negative errno */
|
||||
if (errcode < 0)
|
||||
if (errcode < 0) {
|
||||
errcode = -errcode;
|
||||
}
|
||||
|
||||
if (errcode < NOCODE)
|
||||
if (errcode < NOCODE) {
|
||||
lowsyslog(": %s", strerror(errcode));
|
||||
}
|
||||
|
||||
lowsyslog("\n");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user