commit - 6771d4253a7655812f9e1b5f25d98d86ec416951
commit + 924153d61966399fb9d766961f5ecceb2c97cb48
blob - 238ecb9d0ee975efd8eacc55de14b8cfb69792de
blob + 32023105af9438217a65a1bf6b821e4d225516d1
--- lib/diff_atomize_text.c
+++ lib/diff_atomize_text.c
while (eol == 0 && i < r) {
if (buf[i] != '\r' && buf[i] != '\n') {
if (!ignore_whitespace
- || !isspace(buf[i]))
+ || !isspace((unsigned char)buf[i]))
hash = diff_atom_hash_update(
hash, buf[i]);
if (buf[i] == '\0')
while (line_end < end && *line_end != '\r' && *line_end != '\n') {
if (!ignore_whitespace
- || !isspace(*line_end))
+ || !isspace((unsigned char)*line_end))
hash = diff_atom_hash_update(hash, *line_end);
if (*line_end == '\0')
embedded_nul = true;
blob - b227f7fcc8dee90ca0acf92cdc217e47c29a37eb
blob + 3196ebae01117f7b1caa9b36f55c780ee0c460e5
--- lib/diff_main.c
+++ lib/diff_main.c
unsigned char cl = left[il];
unsigned char cr = right[ir];
- if (isspace(cl) && il < left_len) {
+ if (isspace((unsigned char)cl) && il < left_len) {
il++;
continue;
}
- if (isspace(cr) && ir < right_len) {
+ if (isspace((unsigned char)cr) && ir < right_len) {
ir++;
continue;
}
}
while (il < left_len) {
unsigned char cl = left[il++];
- if (!isspace(cl))
+ if (!isspace((unsigned char)cl))
return 1;
}
while (ir < right_len) {
unsigned char cr = right[ir++];
- if (!isspace(cr))
+ if (!isspace((unsigned char)cr))
return -1;
}
blob - bc44a51ea36b8a3a7cd5581e6787fcdda23168c6
blob + 8b2477047aa2fbba35eb20ce030a857b1d0c4664
--- lib/diff_output.c
+++ lib/diff_output.c
static bool
is_function_prototype(unsigned char ch)
{
- return (isalpha(ch) || ch == '_' || ch == '$');
+ return (isalpha((unsigned char)ch) || ch == '_' || ch == '$');
}
#define begins_with(s, pre) (strncmp(s, pre, sizeof(pre)-1) == 0)