• Daniel Boles's avatar
    updateiconcache: Avoid confusing loop construct · 512a33fe
    Daniel Boles authored
    n_attach_points is the result of g_strv_length(): the index at which the
    string vector ends in NULL. So by definition, when i == n_attach_points,
    string[i] == NULL, and there is no need to check for the latter. The
    fact that we did appears to confuse static analysers, as the dereference
    and index check were inverted from what would normally be safe. We could
    reverse them, but we may as well just remove the unnecessary NULL check.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788458
    512a33fe
updateiconcache.c 38.7 KB