From f70d54001cd1b975db6f4668a6d54dbae7a8ac92 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 26 Dec 2014 16:35:12 +0300 Subject: Improve performance a bit by removing strlen(str) > 0. --- src/map/atcommand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index d43637b81..6f97141b2 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -8740,10 +8740,11 @@ ACMD(channel) { if (strcmpi(subcmd,"create") == 0 && (clif->hChSys->allow_user_channel_creation || pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN))) { // sub1 = channel name; sub2 = password; sub3 = unused + size_t len = strlen(sub1); if (sub1[0] != '#') { clif->message(fd, msg_txt(1405));// Channel name must start with a '#' return false; - } else if (strlen(sub1) < 3 || strlen(sub1) > HCHSYS_NAME_LENGTH) { + } else if (len < 3 || len > HCHSYS_NAME_LENGTH) { sprintf(atcmd_output, msg_txt(1406), HCHSYS_NAME_LENGTH);// Channel length must be between 3 and %d clif->message(fd, atcmd_output); return false; -- cgit v1.2.3-60-g2f50