On 02/06/2012 03:19 PM, Anthony Liguori wrote:
target_type = g_strdup(&type[5]); - target_type[strlen(target_type) - 2] = 0; + *strchr(target_type, '>') = 0;Should use an intermediate variable here and do a NULL check. My eyes can't handle dereferencing strchr() directly even if I understand why it's safe to do :-)
Ok, I'll change to strrchr too since I have to respin. Paolo