Commit 87cab1bc authored by Petri Hintukainen's avatar Petri Hintukainen

Cosmetics

parent 0e53642c
...@@ -1633,23 +1633,27 @@ int64_t udfread_file_tell(UDFFILE *p) ...@@ -1633,23 +1633,27 @@ int64_t udfread_file_tell(UDFFILE *p)
int64_t udfread_file_seek(UDFFILE *p, int64_t pos, int whence) int64_t udfread_file_seek(UDFFILE *p, int64_t pos, int whence)
{ {
if (p) { if (!p) {
switch (whence) { return -1;
case UDF_SEEK_CUR: }
pos += p->pos;
break; switch (whence) {
case UDF_SEEK_END: case UDF_SEEK_CUR:
pos = udfread_file_size(p) + pos; pos += p->pos;
break; break;
case UDF_SEEK_SET: case UDF_SEEK_END:
default: pos = udfread_file_size(p) + pos;
break; break;
} case UDF_SEEK_SET:
if (pos >= 0 && pos <= udfread_file_size(p)) { break;
p->pos = pos; default:
p->block_valid = 0; break;
return p->pos; }
}
if (pos >= 0 && pos <= udfread_file_size(p)) {
p->pos = pos;
p->block_valid = 0;
return p->pos;
} }
return -1; return -1;
......
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