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:
Hi Pablo
I used memcmp() instead of strcmp() since strcmp() creates some
worries inside..gtk..
i think memcmp() is more efficient for usage in gtk compared to
strcmp()..anyways the result is the same with the code....
Thank you
Vinod
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);
*
Maulet
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]