about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2007-06-17 12:58:59 +0200
committerLars Hjemli <hjemli@gmail.com>2007-06-17 12:58:59 +0200
commit486c87ec2906c445ca505c877720d56e02aed784 (patch)
tree42d66dc8e9dfee4812f3f37b7bc8deef04d4e78d
parentAdd and use cgit_tree_link() (diff)
downloadcgit-pink-486c87ec2906c445ca505c877720d56e02aed784.tar.gz
cgit-pink-486c87ec2906c445ca505c877720d56e02aed784.zip
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.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r--ui-shared.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 9ab6409..657e8af 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -127,7 +127,7 @@ static char *repolink(char *title, char *class, char *page, char *head,
 			html_attr(path);
 		delim = "&amp;";
 	}
-	if (head && head != cgit_query_head) {
+	if (head && strcmp(head, cgit_query_head)) {
 		html(delim);
 		html("h=");
 		html_attr(head);
@@ -142,7 +142,7 @@ void cgit_tree_link(char *name, char *title, char *class, char *head,
 	char *delim;
 
 	delim = repolink(title, class, "tree", head, path);
-	if (rev && rev != cgit_query_head) {
+	if (rev && strcmp(rev, cgit_query_head)) {
 		html(delim);
 		html("id=");
 		html_attr(rev);
>Add Trail of LightningJune McEnroe 2019-09-22Revert "Enable cookies in title"June McEnroe 2019-09-20Enable cookies in titleJune McEnroe 2019-09-16Use sensitivity aliases in TF2June McEnroe 2019-09-16Add The Just CityJune McEnroe 2019-09-12Only GET the final redirect locationJune McEnroe 2019-09-12Consume entire bodyJune McEnroe 2019-09-10Add title -v flagJune McEnroe 2019-09-10Use curl error bufferJune McEnroe 2019-09-10Set Accept-Encoding in titleJune McEnroe 2019-09-08Set title User-AgentJune McEnroe 2019-09-07Add -x flag to titleJune McEnroe 2019-09-07Ignore SIGPIPE in relayJune McEnroe 2019-09-07Add A Memory Called EmpireJune McEnroe 2019-09-05Handle lack of Content-TypeJune McEnroe 2019-09-05Use CURLINFO_CONTENT_TYPEJune McEnroe 2019-09-05Decode entities in titlesJune McEnroe 2019-09-05Print title as soon as it's availableJune McEnroe 2019-09-05Use CURL_PREFIX to set flagsJune McEnroe 2019-09-05Add titleJune McEnroe 2019-09-04Add Avorter n'est pas tuerJune McEnroe 2019-08-29Unset executable on shell scriptsJune McEnroe 2019-08-29Add long-missing setopt to bin.7June McEnroe 2019-08-29Add editJune McEnroe