[gvfs] afp: missing enumeration value warning fix
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] afp: missing enumeration value warning fix
- Date: Thu, 21 Nov 2013 11:26:29 +0000 (UTC)
commit 65216faae97bfce29006fbd479feed6fc37cf342
Author: Ondrej Holy <oholy redhat com>
Date: Fri Nov 15 17:37:56 2013 +0100
afp: missing enumeration value warning fix
daemon/gvfsbackendafp.c | 36 +++++++++++++++++-------------------
1 files changed, 17 insertions(+), 19 deletions(-)
---
diff --git a/daemon/gvfsbackendafp.c b/daemon/gvfsbackendafp.c
index 2ab2663..c5fab69 100644
--- a/daemon/gvfsbackendafp.c
+++ b/daemon/gvfsbackendafp.c
@@ -818,28 +818,26 @@ try_seek_on_read (GVfsBackend *backend,
GVfsBackendAfp *afp_backend = G_VFS_BACKEND_AFP (backend);
AfpHandle *afp_handle = (AfpHandle *)handle;
- if (job->seek_type != G_SEEK_END)
- {
- switch (job->seek_type)
- {
- case G_SEEK_CUR:
- afp_handle->offset += job->requested_offset;
- break;
- case G_SEEK_SET:
- afp_handle->offset = job->requested_offset;
- break;
- }
+ switch (job->seek_type)
+ {
+ case G_SEEK_CUR:
+ afp_handle->offset += job->requested_offset;
+ break;
+ case G_SEEK_SET:
+ afp_handle->offset = job->requested_offset;
+ break;
+ case G_SEEK_END:
+ g_vfs_afp_volume_get_fork_parms (afp_backend->volume, afp_handle->fork_refnum,
+ AFP_FILE_BITMAP_EXT_DATA_FORK_LEN_BIT,
+ G_VFS_JOB (job)->cancellable, seek_on_read_cb, job);
+ return TRUE;
+ }
- if (afp_handle->offset < 0)
- afp_handle->offset = 0;
+ if (afp_handle->offset < 0)
+ afp_handle->offset = 0;
- g_vfs_job_seek_read_set_offset (job, afp_handle->offset);
- g_vfs_job_succeeded (G_VFS_JOB (job));
- }
- else
- g_vfs_afp_volume_get_fork_parms (afp_backend->volume, afp_handle->fork_refnum,
- AFP_FILE_BITMAP_EXT_DATA_FORK_LEN_BIT,
- G_VFS_JOB (job)->cancellable, seek_on_read_cb, job);
+ g_vfs_job_seek_read_set_offset (job, afp_handle->offset);
+ g_vfs_job_succeeded (G_VFS_JOB (job));
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]