Skip to content

Commit

Permalink
http-push.c: style fixes
Browse files Browse the repository at this point in the history
b1c7d4a (http-push: refactor lock-related headers creation for curl
requests, 2009-01-24) had many style violations that slipped through.

Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
gitster committed Jan 25, 2009
1 parent 5dc1308 commit d456c9f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions http-push.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,21 +184,22 @@ enum dav_header_flag {
DAV_HEADER_TIMEOUT = (1u << 2)
};

static struct curl_slist *get_dav_token_headers(struct remote_lock *lock, enum dav_header_flag options) {
static struct curl_slist *get_dav_token_headers(struct remote_lock *lock, enum dav_header_flag options)
{
struct strbuf buf = STRBUF_INIT;
struct curl_slist *dav_headers = NULL;

if(options & DAV_HEADER_IF) {
if (options & DAV_HEADER_IF) {
strbuf_addf(&buf, "If: (<%s>)", lock->token);
dav_headers = curl_slist_append(dav_headers, buf.buf);
strbuf_reset(&buf);
}
if(options & DAV_HEADER_LOCK) {
if (options & DAV_HEADER_LOCK) {
strbuf_addf(&buf, "Lock-Token: <%s>", lock->token);
dav_headers = curl_slist_append(dav_headers, buf.buf);
strbuf_reset(&buf);
}
if(options & DAV_HEADER_TIMEOUT) {
if (options & DAV_HEADER_TIMEOUT) {
strbuf_addf(&buf, "Timeout: Second-%ld", lock->timeout);
dav_headers = curl_slist_append(dav_headers, buf.buf);
strbuf_reset(&buf);
Expand Down

0 comments on commit d456c9f

Please sign in to comment.