summaryrefslogtreecommitdiff
path: root/log.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2006-11-09 02:39:29 +0000
committerWayne Davison <wayned@samba.org>2006-11-09 02:39:29 +0000
commit2dc7b8bd0e8d4a2d91334b9bb458df146b1700e8 (patch)
tree9d7c2bdec0e7a57c0928a3656b8353b1f113d949 /log.c
parente0930845ce339fc51f607ba19bc40a8685118b91 (diff)
downloadrsync-2dc7b8bd0e8d4a2d91334b9bb458df146b1700e8.tar.gz
rsync-2dc7b8bd0e8d4a2d91334b9bb458df146b1700e8.tar.bz2
rsync-2dc7b8bd0e8d4a2d91334b9bb458df146b1700e8.zip
Got rid of type-casting into isFOO() and toFOO() functions by
using static inline functions that take a signed char pointer.
Diffstat (limited to 'log.c')
-rw-r--r--log.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/log.c b/log.c
index 9824de74..f7ccc00b 100644
--- a/log.c
+++ b/log.c
@@ -214,11 +214,11 @@ static void filtered_fwrite(FILE *f, const char *buf, int len, int use_isprint)
for (s = buf; s < end; s++) {
if ((s < end - 4
&& *s == '\\' && s[1] == '#'
- && isdigit(*(uchar*)(s+2))
- && isdigit(*(uchar*)(s+3))
- && isdigit(*(uchar*)(s+4)))
+ && isDigit(s + 2)
+ && isDigit(s + 3)
+ && isDigit(s + 4))
|| (*s != '\t'
- && ((use_isprint && !isprint(*(uchar*)s))
+ && ((use_isprint && !isPrint(s))
|| *(uchar*)s < ' '))) {
if (s != buf && fwrite(buf, s - buf, 1, f) != 1)
exit_cleanup(RERR_MESSAGEIO);
@@ -445,7 +445,7 @@ static void log_formatted(enum logcode code, char *format, char *op,
n = fmt + 1;
if (*p == '-')
*n++ = *p++;
- while (isdigit(*(uchar*)p) && n - fmt < (int)(sizeof fmt) - 8)
+ while (isDigit(p) && n - fmt < (int)(sizeof fmt) - 8)
*n++ = *p++;
if (!*p)
break;
@@ -677,7 +677,7 @@ int log_format_has(const char *format, char esc)
for (p = format; (p = strchr(p, '%')) != NULL; ) {
if (*++p == '-')
p++;
- while (isdigit(*(uchar*)p))
+ while (isDigit(p))
p++;
if (!*p)
break;