Welcome! Log In Create A New Profile

Advanced

[njs] UNIT style indentation in njs_string.h.

Dmitry Volyntsev
April 11, 2019 01:16PM
details: https://hg.nginx.org/njs/rev/5c6ca5b99ab0
branches:
changeset: 881:5c6ca5b99ab0
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Thu Apr 11 20:09:41 2019 +0300
description:
UNIT style indentation in njs_string.h.

diffstat:

nxt/nxt_string.h | 27 +++++++++++++++++++--------
1 files changed, 19 insertions(+), 8 deletions(-)

diffs (55 lines):

diff -r bcf988ed8c08 -r 5c6ca5b99ab0 nxt/nxt_string.h
--- a/nxt/nxt_string.h Thu Apr 11 18:53:19 2019 +0300
+++ b/nxt/nxt_string.h Thu Apr 11 20:09:41 2019 +0300
@@ -41,24 +41,34 @@ nxt_upper_case(u_char c)
}


-#define nxt_cpymem(dst, src, n) (((u_char *) memcpy(dst, src, n)) + (n))
+#define \
+nxt_cpymem(dst, src, n) \
+ (((u_char *) memcpy(dst, src, n)) + (n))


-#define nxt_strncmp(s1, s2, n) strncmp((char *) s1, (char *) s2, n)
+#define \
+nxt_strncmp(s1, s2, n) \
+ strncmp((char *) s1, (char *) s2, n)


-#define nxt_memset(buf, c, length) (void) (memset(buf, c, length))
+#define \
+nxt_memset(buf, c, length) \
+ (void) memset(buf, c, length)


-#define nxt_memzero(buf, length) (void) (memset(buf, 0, length))
+#define \
+nxt_memzero(buf, length) \
+ (void) memset(buf, 0, length)


#if (NXT_HAVE_EXPLICIT_BZERO)
-#define nxt_explicit_memzero(buf, length) \
+#define \
+nxt_explicit_memzero(buf, length) \
explicit_bzero(buf, length)
#elif (NXT_HAVE_EXPLICIT_MEMSET)
-#define nxt_explicit_memzero(buf, length) \
- (void) (explicit_memset(buf, 0, length))
+#define \
+nxt_explicit_memzero(buf, length) \
+ (void) explicit_memset(buf, 0, length)
#else
nxt_inline void
nxt_explicit_memzero(u_char *buf, size_t length)
@@ -73,7 +83,8 @@ nxt_explicit_memzero(u_char *buf, size_t
#endif


-#define nxt_strstr_eq(s1, s2) \
+#define \
+nxt_strstr_eq(s1, s2) \
(((s1)->length == (s2)->length) \
&& (memcmp((s1)->start, (s2)->start, (s1)->length) == 0))

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] UNIT style indentation in njs_string.h.

Dmitry Volyntsev 62 April 11, 2019 01:16PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 75
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready