Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Prefer testing line[0] != '\0' over calling strlen()
Baptiste Daroussin committed 13 years ago
commit a855c8f1e718e57f5f4f973df0b20b5168afa95a
parent 272fd2a8f37a49a2ca86d401a1acb4c392467128
1 file changed +1 -1
modified libpkg/pkg_ports.c
@@ -411,7 +411,7 @@ comment_key(struct plist *p, char *line, struct file_attr *a)
		if (line[0] != '\0') {
			line_options = strdup(line);
			while ((option = strsep(&line_options, " ")) != NULL) {
-
				if (strlen(option) > 0)
+
				if (option[0] != '\0')
					pkg_addoption(p->pkg, option + 1,
					    option[0] == '+' ? "on" : "off");
			}