{"thread":{"id":"49677","subject":"[PATCH v1 1/2] path.c: char is not (always) signed","startedAt":"2018-10-25T16:18:16Z","lastAt":"2018-10-25T16:18:16Z","messageCount":1,"participants":["tboegi@web.de"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"361522","messageId":"20181025161308.29207-1-tboegi@web.de","threadId":"49677","inReplyTo":null,"subject":"[PATCH v1 1/2] path.c: char is not (always) signed","fromName":"","fromEmail":"tboegi@web.de","sentAt":"2018-10-25T16:13:08Z","receivedAt":"2018-10-25T16:18:16Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"From: Torsten Bögershausen <tboegi@web.de>\n\nIf a \"char\" in C is signed or unsigned is not specified, because it is\nout of tradition \"implementation dependent\".\nTherefore constructs like \"if (name[i] < 0)\" are not portable,\nuse \"if (name[i] & 0x80)\" instead.\n\nDetected by \"gcc (Raspbian 6.3.0-18+rpi1+deb9u1) 6.3.0 20170516\" when\nsetting\nDEVELOPER = 1\nDEVOPTS = extra-all\n\nSigned-off-by: Torsten Bögershausen <tboegi@web.de>\n---\n path.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/path.c b/path.c\nindex 34f0f98349..ba06ec5b2d 100644\n--- a/path.c\n+++ b/path.c\n@@ -1369,7 +1369,7 @@ static int is_ntfs_dot_generic(const char *name,\n \t\t\tsaw_tilde = 1;\n \t\t} else if (i >= 6)\n \t\t\treturn 0;\n-\t\telse if (name[i] < 0) {\n+\t\telse if (name[i] & 0x80) {\n \t\t\t/*\n \t\t\t * We know our needles contain only ASCII, so we clamp\n \t\t\t * here to make the results of tolower() sane.\n-- \n2.11.0\n\n"}]}