Re: compare entry with list
- From: Maulet <llistes_lfs yahoo es>
- To: gtk-app-devel-list gnome org
- Subject: Re: compare entry with list
- Date: Wed, 26 Jan 2005 10:58:34 +0000
Vinod Joseph wrote:
I used memcmp() instead of strcmp() since strcmp() creates some
i think memcmp() is more efficient for usage in gtk compared to
strcmp()..anyways the result is the same with the code....
I think that the usage of memcmp() in your code is wrong.
You're doing something like:
memcmp (x, y, strlen (x));
But if you want to know if two *strings* are *equal*, you should
consider the trailing '\0', so the right way would be:
memcmp (x, y, strlen (x) + 1);
] [Thread Prev