[libbluray-devel] Cosmetics
Petri Hintukainen
git at videolan.org
Sat Jun 24 14:39:28 CEST 2017
libudfread | branch: master | Petri Hintukainen <phintuka at gmail.com> | Sat Jun 24 12:31:06 2017 +0300| [87cab1bc771676952a66c02701a588dff38aa7d1] | committer: Petri Hintukainen
Cosmetics
> http://git.videolan.org/gitweb.cgi/libudfread.git/?a=commit;h=87cab1bc771676952a66c02701a588dff38aa7d1
---
src/udfread.c | 38 +++++++++++++++++++++-----------------
1 file changed, 21 insertions(+), 17 deletions(-)
diff --git a/src/udfread.c b/src/udfread.c
index f809d61..568042f 100644
--- a/src/udfread.c
+++ b/src/udfread.c
@@ -1633,23 +1633,27 @@ int64_t udfread_file_tell(UDFFILE *p)
int64_t udfread_file_seek(UDFFILE *p, int64_t pos, int whence)
{
- if (p) {
- switch (whence) {
- case UDF_SEEK_CUR:
- pos += p->pos;
- break;
- case UDF_SEEK_END:
- pos = udfread_file_size(p) + pos;
- break;
- case UDF_SEEK_SET:
- default:
- break;
- }
- if (pos >= 0 && pos <= udfread_file_size(p)) {
- p->pos = pos;
- p->block_valid = 0;
- return p->pos;
- }
+ if (!p) {
+ return -1;
+ }
+
+ switch (whence) {
+ case UDF_SEEK_CUR:
+ pos += p->pos;
+ break;
+ case UDF_SEEK_END:
+ 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;
More information about the libbluray-devel
mailing list