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

Cosmetics

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