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/config.c b/config.c
index ce2ed47..5a2f4f0 100644
--- a/config.c
+++ b/config.c
@@ -59,8 +59,10 @@
static void config_parse(struct config *config, char *buf)
{
struct config_item *item;
- char *name, *value;
- char *p, *line;
+ char *name;
+ char *value;
+ char *p;
+ char *line;
for (p = NULL, line = strtok_r(buf, "\n", &p); line;
line = strtok_r(NULL, "\n", &p)) {
@@ -102,7 +104,8 @@
static struct config *config_init_fd(int fd, const char *filename)
{
struct config *config;
- size_t size, len;
+ size_t size;
+ size_t len;
ssize_t rc;
char *buf;
@@ -162,7 +165,8 @@
void config_fini(struct config *config)
{
- struct config_item *item, *next;
+ struct config_item *item;
+ struct config_item *next;
for (item = config->items; item; item = next) {
next = item->next;