summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_errno.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-02-01 19:20:07 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-02-01 19:20:07 +0300
commit6e67bee0f4f96ad0a7d1a231dfdae8431714c66a (patch)
treec422698ab3b7828f7346ca18e1f5a1b8305ed769 /src/nxt_errno.c
parent8942550b13515e54aff9d682bec3da45ade26e18 (diff)
downloadunit-6e67bee0f4f96ad0a7d1a231dfdae8431714c66a.tar.gz
unit-6e67bee0f4f96ad0a7d1a231dfdae8431714c66a.tar.bz2
nxt_str_t changes.
Diffstat (limited to 'src/nxt_errno.c')
-rw-r--r--src/nxt_errno.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/nxt_errno.c b/src/nxt_errno.c
index 64e043e5..9ac79936 100644
--- a/src/nxt_errno.c
+++ b/src/nxt_errno.c
@@ -37,7 +37,7 @@ nxt_strerror_start(void)
{
char *msg;
u_char *p;
- size_t size, len, n;
+ size_t size, length, n;
nxt_uint_t err, invalid;
/* The last entry. */
@@ -73,10 +73,10 @@ nxt_strerror_start(void)
continue;
}
- len = nxt_strlen(msg);
- size += len;
+ length = nxt_strlen(msg);
+ size += length;
- if (len == 0 /* HP-UX empty strings. */
+ if (length == 0 /* HP-UX empty strings. */
|| nxt_errno == NXT_EINVAL
|| nxt_memcmp(msg, "Unknown error", 13) == 0)
{
@@ -87,7 +87,7 @@ nxt_strerror_start(void)
#if (NXT_AIX)
if (nxt_memcmp(msg, "Error ", 6) == 0
- && nxt_memcmp(msg + len - 10, " occurred.", 9) == 0)
+ && nxt_memcmp(msg + length - 10, " occurred.", 9) == 0)
{
invalid++;
continue;
@@ -111,16 +111,16 @@ nxt_strerror_start(void)
for (err = 0; err < nxt_sys_nerr; err++) {
msg = strerror((int) err);
- len = nxt_strlen(msg);
+ length = nxt_strlen(msg);
- nxt_sys_errlist[err].len = len;
- nxt_sys_errlist[err].data = p;
+ nxt_sys_errlist[err].length = length;
+ nxt_sys_errlist[err].start = p;
- p = nxt_cpymem(p, msg, len);
+ p = nxt_cpymem(p, msg, length);
}
- nxt_sys_errlist[err].len = 13;
- nxt_sys_errlist[err].data = p;
+ nxt_sys_errlist[err].length = 13;
+ nxt_sys_errlist[err].start = p;
nxt_memcpy(p, "Unknown error", 13);
nxt_strerror = nxt_runtime_strerror;
@@ -146,7 +146,7 @@ nxt_runtime_strerror(nxt_err_t err, u_char *errstr, size_t size)
msg = &nxt_sys_errlist[n];
- size = nxt_min(size, msg->len);
+ size = nxt_min(size, msg->length);
- return nxt_cpymem(errstr, msg->data, size);
+ return nxt_cpymem(errstr, msg->start, size);
}