commit - f987c90b41240068719f2c9e5638fbd442adfdad
commit + 39c864a48b9d156c8b748725f5f89b3bd3f65038
blob - 94bf306447c1f76eadeb7357e88c4c7b6fce7790
blob + 26af2f2535488277861a555a77b409586c5ada8e
--- got/got.c
+++ got/got.c
err = got_tree_entry_get_symlink_target(&link_target, te, repo);
if (err)
return err;
- for (i = 0; i < strlen(link_target); i++) {
+ for (i = 0; link_target[i] != '\0'; i++) {
if (!isprint((unsigned char)link_target[i]))
link_target[i] = '?';
}
st.suppress = 1;
/* fallthrough */
case 's':
- for (i = 0; i < strlen(optarg); i++) {
+ for (i = 0; optarg[i] != '\0'; i++) {
switch (optarg[i]) {
case GOT_STATUS_MODIFY:
case GOT_STATUS_ADD:
can_recurse = 1;
break;
case 's':
- for (i = 0; i < strlen(optarg); i++) {
+ for (i = 0; optarg[i] != '\0'; i++) {
switch (optarg[i]) {
case GOT_STATUS_MODIFY:
delete_local_mods = 1;
blob - d694a6164057730509b8e3db4e24c4ae1ef16c64
blob + 50c38cd6d28d539dcfa273bc3233bbda7f02fe7a
--- tog/tog.c
+++ tog/tog.c
free(id_str);
return err;
}
- for (i = 0; i < strlen(link_target); i++) {
+ for (i = 0; i < link_target[i] != '\0'; i++) {
if (!isprint((unsigned char)link_target[i]))
link_target[i] = '?';
}