aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/debug_locks.c2
-rw-r--r--lib/vsprintf.c16
2 files changed, 1 insertions, 17 deletions
diff --git a/lib/debug_locks.c b/lib/debug_locks.c
index 0218b4693dd..bc3b11731b9 100644
--- a/lib/debug_locks.c
+++ b/lib/debug_locks.c
@@ -36,7 +36,7 @@ int debug_locks_silent;
*/
int debug_locks_off(void)
{
- if (xchg(&debug_locks, 0)) {
+ if (__debug_locks_off()) {
if (!debug_locks_silent) {
oops_in_progress = 1;
console_verbose();
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index be3001f912e..7536acea135 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1051,13 +1051,6 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
if (str < end)
*str = '%';
++str;
- if (*fmt) {
- if (str < end)
- *str = *fmt;
- ++str;
- } else {
- --fmt;
- }
break;
case FORMAT_TYPE_NRCHARS: {
@@ -1339,8 +1332,6 @@ do { \
break;
case FORMAT_TYPE_INVALID:
- if (!*fmt)
- --fmt;
break;
case FORMAT_TYPE_NRCHARS: {
@@ -1523,13 +1514,6 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
if (str < end)
*str = '%';
++str;
- if (*fmt) {
- if (str < end)
- *str = *fmt;
- ++str;
- } else {
- --fmt;
- }
break;
case FORMAT_TYPE_NRCHARS: