diff options
author | Tollef Fog Heen <tfheen@err.no> | 2009-12-06 22:40:13 +0100 |
---|---|---|
committer | Tollef Fog Heen <tfheen@err.no> | 2009-12-06 22:40:13 +0100 |
commit | 66d49f1375fec838bcd301bb4ca2ef76cee0e47c (patch) | |
tree | 372da2a853f23dd1e6bbe93a3bd537499b3783c7 | |
parent | 25e8ca84acd7fc604fbc59213587887d5119d51a (diff) | |
download | pkg-config-66d49f1375fec838bcd301bb4ca2ef76cee0e47c.tar.gz |
Clean up sysroot support a little bit
This should fix bug #16905 properly.
-rw-r--r-- | pkg.c | 41 |
1 files changed, 15 insertions, 26 deletions
@@ -479,33 +479,22 @@ string_list_to_string (GSList *list) char *retval; tmp = list; - while (tmp != NULL) - { - char *tmpstr = (char*) tmp->data; - if (pcsysrootdir != NULL) - { - if (tmpstr[0] == '-' && - (tmpstr[1] == 'I' || - tmpstr[1] == 'L')) - { - g_string_append_c (str, '-'); - g_string_append_c (str, tmpstr[1]); - g_string_append (str, pcsysrootdir); - g_string_append (str, tmpstr+2); - } - else - { - g_string_append (str, tmpstr); - } - } - else - { - g_string_append (str, tmpstr); - } - g_string_append_c (str, ' '); - - tmp = g_slist_next (tmp); + while (tmp != NULL) { + char *tmpstr = (char*) tmp->data; + if (pcsysrootdir != NULL && + tmpstr[0] == '-' && + (tmpstr[1] == 'I' || + tmpstr[1] == 'L')) { + g_string_append_c (str, '-'); + g_string_append_c (str, tmpstr[1]); + g_string_append (str, pcsysrootdir); + g_string_append (str, tmpstr+2); + } else { + g_string_append (str, tmpstr); } + g_string_append_c (str, ' '); + tmp = g_slist_next (tmp); + } retval = str->str; g_string_free (str, FALSE); |