Kill E_OSL_TRUNC.
[osl.git] / fd.c
diff --git a/fd.c b/fd.c
index cd5232c..7d69a2f 100644 (file)
--- a/fd.c
+++ b/fd.c
@@ -342,15 +342,11 @@ int truncate_file(const char *path, off_t size)
 
        ret = osl_stat(path, &statbuf);
        if (ret < 0)
-               goto out;
+               return ret;
        ret = -E_OSL_BAD_SIZE;
        if (statbuf.st_size < size)
-               goto out;
-       ret = -E_OSL_TRUNC;
+               return ret;
        if (truncate(path, statbuf.st_size - size) < 0)
-               goto out;
-       ret = 1;
-out:
-       return ret;
+               return -ERRNO_TO_ERROR(errno);
+       return 1;
 }
-