Author: axeld Date: 2010-05-27 13:58:18 +0200 (Thu, 27 May 2010) New Revision: 36948 Changeset: http://dev.haiku-os.org/changeset/36948/haiku Modified: haiku/trunk/src/bin/xres.cpp Log: * Fixed stupid usage of strlen() in two cases. * Fixed 80-character column limit. * Updated copyright that Ingo forgot with his previous commit. Modified: haiku/trunk/src/bin/xres.cpp =================================================================== --- haiku/trunk/src/bin/xres.cpp 2010-05-27 11:50:40 UTC (rev 36947) +++ haiku/trunk/src/bin/xres.cpp 2010-05-27 11:58:18 UTC (rev 36948) @@ -1,5 +1,5 @@ /* - * Copyright 2005-2009, Ingo Weinhold, bonefish@xxxxxxxxxxxxx + * Copyright 2005-2010, Ingo Weinhold, bonefish@xxxxxxxxxxxxx * Distributed under the terms of the MIT License. */ @@ -364,8 +364,9 @@ size_t size; for (int32 i = 0; resources.GetResourceInfo(i, &type, &id, &name, &size); i++) { - printf("'%s' %11" B_PRId32 " %11" B_PRIuSIZE " %s\n", resource_type(type), id, - size, (name && strlen(name) > 0 ? name : "(no name)")); + printf("'%s' %11" B_PRId32 " %11" B_PRIuSIZE " %s\n", + resource_type(type), id, size, + name != NULL && name[0] != '\0' ? name : "(no name)"); } } }; @@ -661,7 +662,7 @@ commandName = kArgv[0]; } - if (!commandName || strlen(commandName) == 0) + if (!commandName || commandName[0] == '\0') commandName = kCommandName; // print usage