- len = strlen(str);
-
- /* Check that there's enough space. */
- if ((end - buff) < (len + 1)) {
- ret = ENOSPC;
- } else {
- /* Copy the name backwards. */
- str += len;
-
- for (; len > 0; len--) {
- *--end = *--str;
- }
- /* Add a path separator. */
- *--end = '/';
+ /* Check that there's enough space. */
+ if ((end - buff) < (len + 1)) {
+ ret = ENOSPC;
+ } else {
+ /* Copy the name backwards. */
+ str += len;
+
+ for (; len > 0; len--) {
+ *--end = *--str;