[PATCH 1 of 4] Removed unneeded local variable in ngx_libc_crypt()
Maxim Dounin
mdounin at mdounin.ru
Sun Dec 28 17:36:47 UTC 2025
# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1766623499 -10800
# Thu Dec 25 03:44:59 2025 +0300
# Node ID c348a55bad1160c1a503f0ae57352eb7ebfab74a
# Parent 0b1a383fcbb2aacb1ea3e5b228ea66ee30ec6eb9
Removed unneeded local variable in ngx_libc_crypt().
diff --git a/src/os/unix/ngx_user.c b/src/os/unix/ngx_user.c
--- a/src/os/unix/ngx_user.c
+++ b/src/os/unix/ngx_user.c
@@ -46,9 +46,8 @@ ngx_libc_crypt(ngx_pool_t *pool, u_char
ngx_int_t
ngx_libc_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted)
{
- char *value;
- size_t len;
- ngx_err_t err;
+ char *value;
+ size_t len;
value = crypt((char *) key, (char *) salt);
@@ -64,9 +63,7 @@ ngx_libc_crypt(ngx_pool_t *pool, u_char
return NGX_OK;
}
- err = ngx_errno;
-
- ngx_log_error(NGX_LOG_CRIT, pool->log, err, "crypt() failed");
+ ngx_log_error(NGX_LOG_CRIT, pool->log, ngx_errno, "crypt() failed");
return NGX_ERROR;
}
More information about the nginx-devel
mailing list