summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ratatox.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ratatox.c b/ratatox.c
index 6b270cd..63ec2ab 100644
--- a/ratatox.c
+++ b/ratatox.c
@@ -298,11 +298,8 @@ cb_name_change(Tox *m, int32_t fid, const uint8_t *data, uint16_t len, void *use
blabla(f, "name", "w", "%s\n", name);
if (memcmp(f->namestr, name, len + 1) == 0)
break;
- if (f->namestr[0] == '\0') {
- printf("%s -> %s\n", "Anonymous", name);
- } else {
- printf("%s -> %s\n", f->namestr, name);
- }
+ printf("%s -> %s\n", f->namestr[0] == '\0' ?
+ (uint8_t *)"Anonymous" : f->namestr, name);
memcpy(f->namestr, name, len + 1);
break;
}