[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
signed vs unsigned char in coding.h
From: |
Dan Nicolaescu |
Subject: |
signed vs unsigned char in coding.h |
Date: |
Fri, 20 Feb 2009 08:19:11 -0800 (PST) |
struct coding_system in coding.h contains this:
char *safe_charsets;
and coding.c has this:
#define SAFE_CHARSET_P(coding, id) \
((id) <= (coding)->max_charset_id \
&& (coding)->safe_charsets[id] >= 0)
on some platforms "char" is unsigned by default, so the above >=0
comparison is always true.
What is the intention here, should safe_charsets be defined as "signed char" ?
- signed vs unsigned char in coding.h,
Dan Nicolaescu <=