return -ERRNO_TO_ERROR(errno);
}
+/**
+ * A wrapper for rename(2).
+ *
+ * \param old_path The source path.
+ * \param new_path The destination path.
+ *
+ * \return Standard.
+ *
+ * \sa rename(2).
+ */
+_static_inline_ int osl_rename(const char *old_path, const char *new_path)
+{
+ if (rename(old_path, new_path) < 0)
+ return -ERRNO_TO_ERROR(errno);
+ return 1;
+}
if (!old_filename || !new_filename)
ret = -ERRNO_TO_ERROR(ENOMEM);
else
- ret = para_rename(old_filename, new_filename);
+ ret = osl_rename(old_filename, new_filename);
free(old_filename);
free(new_filename);
if (ret < 0)
return strdup(asc);
}
-/**
- * A wrapper for rename(2).
- *
- * \param old_path The source path.
- * \param new_path The destination path.
- *
- * \return Standard.
- *
- * \sa rename(2).
- */
-_static_inline_ int para_rename(const char *old_path, const char *new_path)
-{
- if (rename(old_path, new_path) < 0)
- return -ERRNO_TO_ERROR(errno);
- return 1;
-}
-
/**
* Iterate over each column of an initialized table.
*