t5404: relax overzealous test
[gitweb.git] / send-pack.c
index 3a842ac2d1aa351e5182f0c67b74aee1bd67d021..6195b43e9abacf346f52b6bbb758c9ca7b617d4e 100644 (file)
@@ -181,8 +181,7 @@ static int receive_status(int in, struct ref *refs)
                        hint->status = REF_STATUS_REMOTE_REJECT;
                        ret = -1;
                }
-               if (msg)
-                       hint->remote_status = xstrdup(msg);
+               hint->remote_status = xstrdup_or_null(msg);
                /* start our next search from the next ref */
                hint = hint->next;
        }
@@ -266,7 +265,7 @@ static int generate_push_cert(struct strbuf *req_buf,
        struct strbuf cert = STRBUF_INIT;
        int update_seen = 0;
 
-       strbuf_addf(&cert, "certificate version 0.1\n");
+       strbuf_addstr(&cert, "certificate version 0.1\n");
        strbuf_addf(&cert, "pusher %s ", signing_key);
        datestamp(&cert);
        strbuf_addch(&cert, '\n');