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

Cosmetics

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