/* Size of the longest file name. */
static size_t gcov_max_filename = 0;
-/* Make sure path compenent of the given FILENAME exists, create
+/* Make sure path component of the given FILENAME exists, create
missing directories. FILENAME must be writable.
Returns zero on success, or -1 if an error occurred. */
prefix_length = strlen(gcov_prefix);
- /* Remove an unneccesary trailing '/' */
+ /* Remove an unnecessary trailing '/' */
if (IS_DIR_SEPARATOR (gcov_prefix[prefix_length - 1]))
prefix_length--;
}
+ else
+ prefix_length = 0;
/* Allocate and initialize the filename scratch space. */
gi_filename = alloca (prefix_length + gcov_max_filename + 1);