History

ui-shared: use strcmp() to compare strings

Somehow a couple of pointer comparisions crept into the new repolink() and cgit_tree_link() functions. Fix it.

Lars Hjemli committed 19 years ago

Commit 486c87e1 parent 44947bf1 file · +2 −2Browse files

Unified · Split

ui-shared.c+2−2
@@ -127,7 +127,7 @@ static char *repolink(char *title, char *class, char *page, char *head, · 126 unmodified lines
127127 html_attr(path);
128128 delim = "&";
129129 }
130− if (head && head != cgit_query_head) {
130+ if (head && strcmp(head, cgit_query_head)) {
131131 html(delim);
132132 html("h=");
133133 html_attr(head);
@@ -142,7 +142,7 @@ void cgit_tree_link(char *name, char *title, char *class, char *head, · 8 unmodified lines
142142 char *delim;
143143
144144 delim = repolink(title, class, "tree", head, path);
145− if (rev && rev != cgit_query_head) {
145+ if (rev && strcmp(rev, cgit_query_head)) {
146146 html(delim);
147147 html("id=");
148148 html_attr(rev);