On Wed, May 23, 2012 at 3:31 PM, Cedric BAIL <[email protected]> wrote: > On Tue, May 22, 2012 at 6:02 PM, Leandro Pereira <[email protected]> > wrote: >> On Mon, May 21, 2012 at 10:35 PM, Enlightenment SVN >> <[email protected]> wrote: >>> cnp_debug("Got some HTML: Checking encoding is useful\n"); >>> data = notify->data; >>> + char *stripstr = malloc(sizeof(char) * (data->length + 1)); >> >> sizeof(char) is 1 by definition. Just malloc(data->length + 1). > > You are wrong sizeof(unsigned char) is one. On some system, it could > be a signed char and be bigger. I think it's the case on SPARC. Not > sure about it.
if i'm not mistaken, on some systems, sizeof(char) == 1 but the size taken in memory by a char is > 8 bits (on some cray, it's 64 bits) the standard (C ansi) says that if 't' is an integer type, sizeof(t) == sizeof(signed t) == sizeof(unsigned t) Vincent ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
