Commit 0f724956 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent c70438d5
......@@ -69,7 +69,7 @@ tuple<File, error> open(const string &path, int flags, mode_t mode) {
}
error _File::close() {
_File &f = *this;
_File& f = *this;
int err = ::close(f._fd);
if (err != 0)
......@@ -79,7 +79,7 @@ error _File::close() {
}
tuple<int, error> _File::read(void *buf, size_t count) {
_File &f = *this;
_File& f = *this;
int n;
n = ::read(f._fd, buf, count);
......@@ -92,7 +92,7 @@ tuple<int, error> _File::read(void *buf, size_t count) {
}
tuple <int, error> _File::write(const void *buf, size_t count) {
_File &f = *this;
_File& f = *this;
int n, wrote=0;
// NOTE contrary to write(2) we have to write all data as io.Writer requires.
......@@ -110,7 +110,7 @@ tuple <int, error> _File::write(const void *buf, size_t count) {
}
error _File::stat(struct stat *st) {
_File &f = *this;
_File& f = *this;
int err = fstat(f._fd, st);
if (err != 0)
......@@ -121,7 +121,7 @@ error _File::stat(struct stat *st) {
// _errno returns error corresponding to op(file) and errno.
error _File::_errno(const char *op) {
_File &f = *this;
_File& f = *this;
return _pathError(op, f._path, errno);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment