diff options
author | sin <sin@2f30.org> | 2014-09-15 14:36:28 +0100 |
---|---|---|
committer | sin <sin@2f30.org> | 2014-09-15 14:36:28 +0100 |
commit | 11fccffc5de8321a66b7ab813ff0f99e92daa657 (patch) | |
tree | 9fe8357ca737a0ef7207c7a10557e7b3a04da7ac | |
parent | 5afc5df6a272da891437f730cc545a6daca044ef (diff) |
Squash together retarded conditional
-rw-r--r-- | ratatox.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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; } |