]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic/terminal-util: drop 'U' suffix
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 15 May 2025 11:55:11 +0000 (13:55 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 16 May 2025 13:33:10 +0000 (15:33 +0200)
C automatically casts a signed int to unsigned in binary operation with an
unsigned int. Thus that suffix is not useful. Also surrounding code doesn't use
it.

src/basic/terminal-util.h

index d008d0456cfd9c19f6dd8c11df7a0ad06823f7bd..fa771230ff98d334146f9199cbf3ad4ff0a496c4 100644 (file)
@@ -165,7 +165,7 @@ int pty_open_peer(int fd, int mode);
 static inline bool osc_char_is_valid(char c) {
         /* Checks whether the specified character is safe to be included inside an ANSI OSC sequence, as per
          * ECMA-48 5th edition, section 8.3.89 */
-        return (unsigned char) c >= 32U && (unsigned char) c < 127;
+        return (unsigned char) c >= 32 && (unsigned char) c < 127;
 }
 
 static inline bool vtnr_is_valid(unsigned n) {