patch 8.0.1496: clearing a pointer takes two lines
Problem: Clearing a pointer takes two lines.
Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi,
closes #2629)
diff --git a/src/os_mac_conv.c b/src/os_mac_conv.c
index 1fddc61..2bd337e 100644
--- a/src/os_mac_conv.c
+++ b/src/os_mac_conv.c
@@ -480,10 +480,7 @@
if (TECConvertText(gPathConverter, decompPath,
decompLen, &decompLen, result,
decompLen, &actualLen) != noErr)
- {
- vim_free(result);
- result = NULL;
- }
+ VIM_CLEAR(result);
}
}
@@ -517,10 +514,7 @@
utf8_len += inputRead;
}
else
- {
- vim_free(result);
- result = NULL;
- }
+ VIM_CLEAR(result);
}
else
{