summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2024-01-16 15:37:07 +0000
committerAndrei Zeliankou <zelenkov@nginx.com>2024-01-16 15:37:07 +0000
commita1e00b4e28d56365b4b5cc4aa44185c4b53f5c33 (patch)
treed733e3560e2734d7bfdd4c92df6ad3736e3a1e0b
parent5a8337933df1cf3aba967d86549e236dd9173386 (diff)
downloadunit-a1e00b4e28d56365b4b5cc4aa44185c4b53f5c33.tar.gz
unit-a1e00b4e28d56365b4b5cc4aa44185c4b53f5c33.tar.bz2
White space formatting fixes
Closes: <https://github.com/nginx/unit/pull/1062>
-rw-r--r--auto/cc/deps4
-rw-r--r--pkg/rpm/Makefile2
-rw-r--r--src/java/nginx/unit/websocket/Util.java2
-rw-r--r--src/java/nginx/unit/websocket/server/WsSessionListener.java2
-rw-r--r--src/nodejs/unit-http/websocket_connection.js8
-rw-r--r--src/nodejs/unit-http/websocket_request.js8
-rw-r--r--src/nxt_clone.c8
-rw-r--r--src/nxt_openssl.c2
-rw-r--r--src/nxt_router.c2
-rw-r--r--src/nxt_socket.c8
-rwxr-xr-xtools/setup-unit10
-rwxr-xr-xtools/unitc4
12 files changed, 30 insertions, 30 deletions
diff --git a/auto/cc/deps b/auto/cc/deps
index 6e7df20f..11429788 100644
--- a/auto/cc/deps
+++ b/auto/cc/deps
@@ -3,7 +3,7 @@ case "$NXT_CC_NAME" in
SunC):
nxt_gen_dep_flags() {
- $echo "-xMMD -xMF $NXT_BUILD_DIR/$nxt_dep.tmp"
+ $echo "-xMMD -xMF $NXT_BUILD_DIR/$nxt_dep.tmp"
}
nxt_gen_dep_post() {
@@ -15,7 +15,7 @@ case "$NXT_CC_NAME" in
*)
nxt_gen_dep_flags() {
- $echo "-MMD -MF $NXT_BUILD_DIR/$nxt_dep -MT $NXT_BUILD_DIR/$nxt_obj"
+ $echo "-MMD -MF $NXT_BUILD_DIR/$nxt_dep -MT $NXT_BUILD_DIR/$nxt_obj"
}
nxt_gen_dep_post() {
diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile
index 355f8a59..7906fc24 100644
--- a/pkg/rpm/Makefile
+++ b/pkg/rpm/Makefile
@@ -254,7 +254,7 @@ rpmbuild/SPECS/unit-%.spec: unit.module.spec.in ../../docs/changes.xml | rpmbuil
cat ../../build/unit-$(MODULE_SUFFIX_$*).rpm-changelog | sed -e \
"s/> - $(DEFAULT_VERSION)-$(DEFAULT_RELEASE)/> - $(MODULE_VERSION_$*)-$(MODULE_RELEASE_$*)/" \
>> $@.tmp
- mv $@.tmp $@
+ mv $@.tmp $@
unit-%: check-build-depends-% rpmbuild/SPECS/unit-%.spec rpmbuild/SOURCES/unit-$(VERSION).tar.gz
@echo "===> Building $(subst _,-,$@) package" ; \
diff --git a/src/java/nginx/unit/websocket/Util.java b/src/java/nginx/unit/websocket/Util.java
index 6acf3ade..5388431f 100644
--- a/src/java/nginx/unit/websocket/Util.java
+++ b/src/java/nginx/unit/websocket/Util.java
@@ -332,7 +332,7 @@ public class Util {
public static List<DecoderEntry> getDecoders(
List<Class<? extends Decoder>> decoderClazzes)
- throws DeploymentException{
+ throws DeploymentException {
List<DecoderEntry> result = new ArrayList<>();
if (decoderClazzes != null) {
diff --git a/src/java/nginx/unit/websocket/server/WsSessionListener.java b/src/java/nginx/unit/websocket/server/WsSessionListener.java
index fc2bc9c5..2921bd45 100644
--- a/src/java/nginx/unit/websocket/server/WsSessionListener.java
+++ b/src/java/nginx/unit/websocket/server/WsSessionListener.java
@@ -19,7 +19,7 @@ package nginx.unit.websocket.server;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
-public class WsSessionListener implements HttpSessionListener{
+public class WsSessionListener implements HttpSessionListener {
private final WsServerContainer wsServerContainer;
diff --git a/src/nodejs/unit-http/websocket_connection.js b/src/nodejs/unit-http/websocket_connection.js
index 4eccf6bf..c04075d7 100644
--- a/src/nodejs/unit-http/websocket_connection.js
+++ b/src/nodejs/unit-http/websocket_connection.js
@@ -36,11 +36,11 @@ var idCounter = 0;
function WebSocketConnection(socket, extensions, protocol, maskOutgoingPackets, config) {
this._debug = utils.BufferingLogger('websocket:connection', ++idCounter);
this._debug('constructor');
-
+
if (this._debug.enabled) {
instrumentSocketForDebugging(this, socket);
}
-
+
// Superclass Constructor
EventEmitter.call(this);
@@ -432,8 +432,8 @@ WebSocketConnection.prototype.processFrame = function(frame) {
// logic to emit the ping frame: this is only done when a listener is known to exist
// Expose a function allowing the user to override the default ping() behavior
var cancelled = false;
- var cancel = function() {
- cancelled = true;
+ var cancel = function() {
+ cancelled = true;
};
this.emit('ping', cancel, frame.binaryPayload);
diff --git a/src/nodejs/unit-http/websocket_request.js b/src/nodejs/unit-http/websocket_request.js
index d84e428b..450ab629 100644
--- a/src/nodejs/unit-http/websocket_request.js
+++ b/src/nodejs/unit-http/websocket_request.js
@@ -247,7 +247,7 @@ WebSocketRequest.prototype.parseCookies = function(str) {
WebSocketRequest.prototype.accept = function(acceptedProtocol, allowedOrigin, cookies) {
this._verifyResolution();
-
+
// TODO: Handle extensions
var protocolFullCase;
@@ -418,7 +418,7 @@ WebSocketRequest.prototype.accept = function(acceptedProtocol, allowedOrigin, co
// if (negotiatedExtensions) {
// response += 'Sec-WebSocket-Extensions: ' + negotiatedExtensions.join(', ') + '\r\n';
// }
-
+
// Mark the request resolved now so that the user can't call accept or
// reject a second time.
this._resolved = true;
@@ -447,12 +447,12 @@ WebSocketRequest.prototype.accept = function(acceptedProtocol, allowedOrigin, co
WebSocketRequest.prototype.reject = function(status, reason, extraHeaders) {
this._verifyResolution();
-
+
// Mark the request resolved now so that the user can't call accept or
// reject a second time.
this._resolved = true;
this.emit('requestResolved', this);
-
+
if (typeof(status) !== 'number') {
status = 403;
}
diff --git a/src/nxt_clone.c b/src/nxt_clone.c
index 1cd70f6c..305f4261 100644
--- a/src/nxt_clone.c
+++ b/src/nxt_clone.c
@@ -152,7 +152,7 @@ nxt_clone_credential_map_set(nxt_task_t *task, const char* mapfile, pid_t pid,
return NXT_ERROR;
}
- if (i+1 < map->size) {
+ if (i + 1 < map->size) {
*p++ = '\n';
} else {
@@ -382,13 +382,13 @@ nxt_clone_vldt_credential_gidmap(nxt_task_t *task,
m = map->map[j];
if (!base_ok && creds->base_gid >= (nxt_gid_t) m.container
- && creds->base_gid < (nxt_gid_t) (m.container+m.size))
+ && creds->base_gid < (nxt_gid_t) (m.container + m.size))
{
base_ok = 1;
}
if (creds->gids[i] >= (nxt_gid_t) m.container
- && creds->gids[i] < (nxt_gid_t) (m.container+m.size))
+ && creds->gids[i] < (nxt_gid_t) (m.container + m.size))
{
gid_ok = 1;
break;
@@ -405,7 +405,7 @@ nxt_clone_vldt_credential_gidmap(nxt_task_t *task,
m = map->map[i];
if (creds->base_gid >= (nxt_gid_t) m.container
- && creds->base_gid < (nxt_gid_t) (m.container+m.size))
+ && creds->base_gid < (nxt_gid_t) (m.container + m.size))
{
base_ok = 1;
break;
diff --git a/src/nxt_openssl.c b/src/nxt_openssl.c
index f56135f3..8f66f45b 100644
--- a/src/nxt_openssl.c
+++ b/src/nxt_openssl.c
@@ -73,7 +73,7 @@ static nxt_int_t nxt_ssl_conf_commands(nxt_task_t *task, SSL_CTX *ctx,
static nxt_int_t nxt_tls_ticket_keys(nxt_task_t *task, SSL_CTX *ctx,
nxt_tls_init_t *tls_init, nxt_mp_t *mp);
static int nxt_tls_ticket_key_callback(SSL *s, unsigned char *name,
- unsigned char *iv, EVP_CIPHER_CTX *ectx,HMAC_CTX *hctx, int enc);
+ unsigned char *iv, EVP_CIPHER_CTX *ectx, HMAC_CTX *hctx, int enc);
#endif
static void nxt_ssl_session_cache(SSL_CTX *ctx, size_t cache_size,
time_t timeout);
diff --git a/src/nxt_router.c b/src/nxt_router.c
index 4e3cb303..0b979575 100644
--- a/src/nxt_router.c
+++ b/src/nxt_router.c
@@ -2971,7 +2971,7 @@ nxt_router_tls_rpc_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg,
mp = tmcf->router_conf->mem_pool;
- if (tls->socket_conf->tls == NULL){
+ if (tls->socket_conf->tls == NULL) {
tlscf = nxt_mp_zget(mp, sizeof(nxt_tls_conf_t));
if (nxt_slow_path(tlscf == NULL)) {
goto fail;
diff --git a/src/nxt_socket.c b/src/nxt_socket.c
index a8e0d514..9ac8ecd2 100644
--- a/src/nxt_socket.c
+++ b/src/nxt_socket.c
@@ -322,15 +322,15 @@ nxt_socket_error(nxt_socket_t s)
err = 0;
len = sizeof(int);
- /*
- * Linux and BSDs return 0 and store a pending error in the err argument;
+ /*
+ * Linux and BSDs return 0 and store a pending error in the err argument;
* Solaris returns -1 and sets the errno.
- */
+ */
ret = getsockopt(s, SOL_SOCKET, SO_ERROR, (void *) &err, &len);
if (nxt_slow_path(ret == -1)) {
err = nxt_errno;
- }
+ }
return err;
}
diff --git a/tools/setup-unit b/tools/setup-unit
index 38592fe3..f40a767c 100755
--- a/tools/setup-unit
+++ b/tools/setup-unit
@@ -77,9 +77,9 @@ SYNOPSIS
Subcommands
├── cmd [-h]
├── ctl [-h] [-s SOCK] SUBCOMMAND [ARGS]
- │   ├── edit [-h] PATH
- │   ├── http [-h] [-c CURLOPT] METHOD PATH
- │   └── insert [-h] PATH INDEX
+ │ ├── edit [-h] PATH
+ │ ├── http [-h] [-c CURLOPT] METHOD PATH
+ │ └── insert [-h] PATH INDEX
├── freeport [-h]
├── json-ins [-hn] JSON INDEX
├── os-probe [-h]
@@ -87,8 +87,8 @@ SYNOPSIS
├── repo-config [-hn] [PKG-MANAGER OS-NAME OS-VERSION]
├── restart [-hls]
├── sock [-h] SUBCOMMAND [ARGS]
- │   ├── filter [-chs]
- │   └── find [-h]
+ │ ├── filter [-chs]
+ │ └── find [-h]
└── welcome [-hn]
DESCRIPTION
diff --git a/tools/unitc b/tools/unitc
index 4ab5f663..22417266 100755
--- a/tools/unitc
+++ b/tools/unitc
@@ -1,6 +1,6 @@
#!/bin/bash
# unitc - a curl wrapper for configuring NGINX Unit
-# https://github.com/nginx/unit/tree/master/tools
+# https://github.com/nginx/unit/tree/master/tools
# NGINX, Inc. (c) 2023
# Defaults
@@ -292,7 +292,7 @@ else
exit 1
fi
NEW_ELEMENT=$(cat ${CONF_FILES[@]})
- echo $NEW_ELEMENT | jq > /dev/null || exit $? # Test the input is valid JSON before proceeding
+ echo $NEW_ELEMENT | jq > /dev/null || exit $? # Test the input is valid JSON before proceeding
OLD_ARRAY=$($RPC_CMD curl -s $UNIT_CTRL$URI)
if [ "$(echo $OLD_ARRAY | jq -r type)" = "array" ]; then
echo $OLD_ARRAY | jq ". |= [$NEW_ELEMENT] + ." | $RPC_CMD curl -X PUT --data-binary @- $UNIT_CTRL$URI 2> /tmp/${0##*/}.$$ | $OUTPUT