浏览代码

auth_identity: fix misleading indentation level

Daniel-Constantin Mierla 9 年之前
父节点
当前提交
e5532f05d7
共有 1 个文件被更改,包括 11 次插入9 次删除
  1. 11 9
      modules/auth_identity/auth_hdrs.c

+ 11 - 9
modules/auth_identity/auth_hdrs.c

@@ -448,7 +448,7 @@ int digeststr_asm(dynstr *sout, struct sip_msg *msg, str *sdate, int iflags)
 
 		/* there was an error or the required header is missing */
 		if (iRes==AUTH_ERROR
-		    || (iRes==AUTH_NOTFOUND && (pactpart[i1].iflag & DS_REQUIRED)))
+				|| (iRes==AUTH_NOTFOUND && (pactpart[i1].iflag & DS_REQUIRED)))
 			return -1;
 
 		switch (pactpart[i1].itype) {
@@ -568,10 +568,12 @@ int append_date(str *sdate, int idatesize, time_t *tout, struct sip_msg *msg)
 	if (sdate && idatesize >= ilen) {
 		memcpy(sdate->s, date_str, ilen);
 		sdate->len=ilen;
-	} else
+	} else {
 		return -5;
-		if (tout)
-			*tout=tdate_now;
+	}
+
+	if (tout)
+		*tout=tdate_now;
 
 	return 0;
 }
@@ -666,24 +668,24 @@ dc_end:
 		goto other;
 	} else {
 		return (p + 1);
- 	}
+	}
 
 	/* Unknown header type */
 other:
 	p = q_memchr(p, ':', end - p);
- 	if (!p) {        /* No double colon found, error.. */
+	if (!p) {        /* No double colon found, error.. */
 		*type = HDR_ERROR_T;
 		return 0;
- 	} else {
+	} else {
 		*type = HDR_OTHER_T;
 		return (p + 1);
- 	}
+	}
 
 	return p;
 }
 
 /* parses buffer that contains a SIP message header, looks for "Contact"
-   header field and returns the value of that */
+ * header field and returns the value of that */
 static int get_contact_body(char *buf, unsigned int len, str *sout)
 {
 	char *end, *s, *tmp, *match;