summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2023-04-28 18:07:33 +0200
committerDaniel Stenberg <daniel@haxx.se>2023-04-28 23:11:00 +0200
commit9ce7eee07042605045dcfd02a6f5b38ad5c8a05d (patch)
tree7a83474325c43f8d34233dae5bad509b2475ce74 /tests
parent31303c34e90949847860db82c4768cab1482beda (diff)
downloadcurl-9ce7eee07042605045dcfd02a6f5b38ad5c8a05d.tar.gz
checksrc: find bad indentation in conditions without open brace
If the previous line starts with if/while/for AND ends with a closed parenthesis and there's an equal number of open and closed parentheses on that line, verify that this line is indented $indent more steps, if not a cpp line. Also adjust the fall-out from this fix. Closes #11054
Diffstat (limited to 'tests')
-rw-r--r--tests/libtest/lib678.c8
-rw-r--r--tests/server/socksd.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/libtest/lib678.c b/tests/libtest/lib678.c
index 8da39111d..942808e2a 100644
--- a/tests/libtest/lib678.c
+++ b/tests/libtest/lib678.c
@@ -44,12 +44,12 @@ static int loadfile(const char *filename, void **filedata, size_t *filesize)
else
datasize = (size_t)cert_tell;
if(continue_reading)
- continue_reading = fseek(fInCert, 0, SEEK_SET) == 0;
+ continue_reading = fseek(fInCert, 0, SEEK_SET) == 0;
if(continue_reading)
- data = malloc(datasize + 1);
+ data = malloc(datasize + 1);
if((!data) ||
- ((int)fread(data, datasize, 1, fInCert) != 1))
- continue_reading = FALSE;
+ ((int)fread(data, datasize, 1, fInCert) != 1))
+ continue_reading = FALSE;
fclose(fInCert);
if(!continue_reading) {
free(data);
diff --git a/tests/server/socksd.c b/tests/server/socksd.c
index 071b4d25d..22a5ee7f5 100644
--- a/tests/server/socksd.c
+++ b/tests/server/socksd.c
@@ -1095,7 +1095,7 @@ int main(int argc, char *argv[])
#ifdef USE_UNIX_SOCKETS
if(socket_domain == AF_UNIX)
- logmsg("Listening on unix socket %s", unix_socket);
+ logmsg("Listening on unix socket %s", unix_socket);
else
#endif
logmsg("Listening on port %hu", port);