From aa90372428fa28e37b43d860966de1eab5a5c695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 23 Sep 2025 23:08:51 +0200 Subject: [PATCH] ftp: Use `return true` / `return false` for functions returning `bool` Changes done with Coccinelle: @r1@ identifier fn; typedef bool; symbol false; symbol true; @@ bool fn ( ... ) { <... return ( - 0 + false | - 1 + true ) ; ...> } Coccinelle patch sourced from torvalds/linux@46b5c9b856e8bcb44d8570cc55c46d19ca2428ff. --- ext/ftp/ftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 2c777e777a6..f9c61748efd 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -1193,7 +1193,7 @@ static bool ftp_putcmd(ftpbuf_t *ftp, const char *cmd, const size_t cmd_len, con return false; } if (strpbrk(args, "\r\n")) { - return 0; + return false; } size = slprintf(data, sizeof(data), "%s %s\r\n", cmd, args); } else {