17.11.2016, 19:16
Hey, just a little suggestion:
Instead of doing
you could use a ternary operator and do
That's not necessary, but I think that would be better.
Instead of doing
Код:
if(!success) { format(string, sizeof(string), "IP: %s || Pass: %s || Success: FAILED", ip, password); } else { format(string, sizeof(string), "IP: %s || Pass: %s || Success: SUCCESS", ip, password); }
Код:
format(string, sizeof(string), "IP: %s || Pass: %s || Success: %s", (success) ? ("SUCCESS") : ("FAILED"), ip, password);