obmc-console: Fix readability-isolate-declaration
For example:
```
/usr/bin/clang-tidy -checks=-*, readability-isolate-declaration -export-fixes /tmp/tmpoo7fbs72/tmpo8xiwfxs.yaml -p=build /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test/test-client-escape.c
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../config.c:61:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
char *name, *value;
^~~~~~~~~~~~~~~~~~~
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../config.c:62:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
char *p, *line;
^~~~~~~~~~~~~~~
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../config.c:110:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
size_t size, len;
^~~~~~~~~~~~~~~~~
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../config.c:170:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
struct config_item *item, *next;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../console-client.c:263:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
struct console_client _client, *client;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.
```
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ia7829b1672ea2dfb3fa020c7c48bd8266e6a1769
diff --git a/socket-handler.c b/socket-handler.c
index f37dcb8..4a53a51 100644
--- a/socket-handler.c
+++ b/socket-handler.c
@@ -123,7 +123,8 @@
static ssize_t send_all(struct client *client, void *buf, size_t len,
bool block)
{
- int fd, flags;
+ int fd;
+ int flags;
ssize_t rc;
size_t pos;
@@ -168,7 +169,8 @@
{
uint8_t *buf;
ssize_t wlen;
- size_t len, total_len;
+ size_t len;
+ size_t total_len;
bool block;
total_len = 0;
@@ -302,7 +304,8 @@
{
struct socket_handler *sh = to_socket_handler(handler);
struct client *client;
- int fd, n;
+ int fd;
+ int n;
if (!(events & POLLIN)) {
return POLLER_OK;