使用gcc C99编译
我正在尝试使用字符串比较函数进行字符串比较。 但是,似乎在strcmp行上出现了堆栈转储。
**属性将包含这些内容,因此我正在寻找框架类型。
[name] [time] [type] [time]
[name] [callref] [type] [string]
[name] [port] [type] [int16]
[name] [frametype] [type] [int16]
这是比较的正确方式吗?
非常感谢任何建议,
void g_start_element(void *data, const char *element, const char **attribute)
{
for(i = 0; attribute[i]; i++)
{
/* Only interested in the frametype */
if(strcmp(attribute[i], "frametype") == 0)
{
/* do some work here */
}
}
}