diff options
author | Chocobo1 <Chocobo1@users.noreply.github.com> | 2015-05-31 16:32:51 +0800 |
---|---|---|
committer | Chocobo1 <Chocobo1@users.noreply.github.com> | 2015-05-31 18:53:35 +0800 |
commit | 5cecc86856f717711e05696d6202180bfe335ac8 (patch) | |
tree | 64fbed168de12ae2ff56098c5e4d5efdd570cad5 | |
parent | 5e61c5c0e4af542a0b9d33c65e601b1d08507d0e (diff) |
Fix inconsistency in format module example
-rw-r--r-- | src/out_format.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/out_format.c b/src/out_format.c index 84a5a2b..1cabf9d 100644 --- a/src/out_format.c +++ b/src/out_format.c @@ -189,8 +189,8 @@ static inline void add_token(int type, char *data) if (out_tokens == NULL) quit("Cannot reallocate out token array\n"); } - - + + out_tokens[token_index].ot_type = type; out_tokens[token_index].ot_str = data; token_index++; @@ -250,7 +250,7 @@ static int format_probe(void) } goto out; - + finish_escape: *p = '\0'; add_token(OT_STRING, s); @@ -259,7 +259,7 @@ finish_escape: continue; } -out: +out: if (new_one) { add_token(OT_STRING, p); new_one = 0; @@ -328,9 +328,9 @@ static void print_help(void) " \"$(element:name) $(attr:rxrate:packets) $(attr:txrate:packets)\\n\"\n" \ " eth0 33 5\n" \ "\n" \ - " \"Element: $(element:name)\\nBytes Rate: \" \\\n" \ - " \"$(attr:rxrate:bytes)/$(attr:txrate:bytes)\\nPackets Rate: \" \\\n" \ - " \"$(attr:rxrate:packets)/$(attr:txrate:packets)\\n\"\n" \ + " \"Item: $(element:name)\\n\" \\\n" \ + " \"Bytes Rate: $(attr:rxrate:bytes)/$(attr:txrate:bytes)\\n\" \\\n" \ + " \"Packets Rate: $(attr:rxrate:packets)/$(attr:txrate:packets)\\n\"\n" \ " Item: eth0\n" \ " Bytes Rate: 49130/2119\n" \ " Packets Rate: 40/11\n" \ |