* Fixed stupid usage of strlen() in two cases.

* Fixed 80-character column limit.
* Updated copyright that Ingo forgot with his previous commit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36948 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-05-27 11:58:18 +00:00
parent d73ddac5bf
commit 279d26af87
+5 -4
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2005-2009, Ingo Weinhold, [email protected]. * Copyright 2005-2010, Ingo Weinhold, [email protected].
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
@@ -364,8 +364,9 @@ struct ListState : State {
size_t size; size_t size;
for (int32 i = 0; for (int32 i = 0;
resources.GetResourceInfo(i, &type, &id, &name, &size); i++) { resources.GetResourceInfo(i, &type, &id, &name, &size); i++) {
printf("'%s' %11" B_PRId32 " %11" B_PRIuSIZE " %s\n", resource_type(type), id, printf("'%s' %11" B_PRId32 " %11" B_PRIuSIZE " %s\n",
size, (name && strlen(name) > 0 ? name : "(no name)")); resource_type(type), id, size,
name != NULL && name[0] != '\0' ? name : "(no name)");
} }
} }
}; };
@@ -661,7 +662,7 @@ print_usage(bool error)
commandName = kArgv[0]; commandName = kArgv[0];
} }
if (!commandName || strlen(commandName) == 0) if (!commandName || commandName[0] == '\0')
commandName = kCommandName; commandName = kCommandName;
// print usage // print usage