gcc C99 でコンパイルする
文字列比較を使用して 2 つの文字列を比較しようとしています。しかし、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 */
}
}
}