1.1 --- a/libfsclient/lib/src/client.cc Sat May 15 17:10:02 2021 +0200
1.2 +++ b/libfsclient/lib/src/client.cc Sat May 15 23:38:39 2021 +0200
1.3 @@ -147,16 +147,18 @@
1.4
1.5 else if (position == file->end_pos)
1.6 {
1.7 - if (client_next_region(file) == NULL)
1.8 - return -L4_EIO;
1.9 + err = client_next_region(file);
1.10 + if (err)
1.11 + return err;
1.12 }
1.13
1.14 /* Within the current pipe region, synchronise with the pipe object. */
1.15
1.16 else
1.17 {
1.18 - if (client_current_region(file) == NULL)
1.19 - return -L4_EIO;
1.20 + err = client_current_region(file);
1.21 + if (err)
1.22 + return err;
1.23 }
1.24 }
1.25
1.26 @@ -200,24 +202,24 @@
1.27
1.28 /* Obtain the current region of a pipe. */
1.29
1.30 -void *client_current_region(file_t *file)
1.31 +long client_current_region(file_t *file)
1.32 {
1.33 - if ((file == NULL) || (pipe_current(file)))
1.34 - return NULL;
1.35 + if (file == NULL)
1.36 + return -L4_EINVAL;
1.37
1.38 - return file->memory;
1.39 + return pipe_current(file);
1.40 }
1.41
1.42
1.43
1.44 /* Obtain the next region of a pipe. */
1.45
1.46 -void *client_next_region(file_t *file)
1.47 +long client_next_region(file_t *file)
1.48 {
1.49 - if ((file == NULL) || (pipe_next(file)))
1.50 - return NULL;
1.51 + if (file == NULL)
1.52 + return -L4_EINVAL;
1.53
1.54 - return file->memory;
1.55 + return pipe_next(file);
1.56 }
1.57
1.58