From e92b662dc192400be3ded5f8ae60bc11c7d70e6f Mon Sep 17 00:00:00 2001 From: Nicolas Pennequin Date: Wed, 10 Oct 2007 22:41:38 +0200 Subject: [PATCH] Silence the warning from reset_handle() --- apps/buffering.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/buffering.c b/apps/buffering.c index 53a275ffd..a1686ecf5 100644 --- a/apps/buffering.c +++ b/apps/buffering.c @@ -433,10 +433,12 @@ static ssize_t buffer_handle(int handle_id) } /* Reset writing position and data buffer of a handle to its current offset. - Use this after having set the new offset to use. */ -void reset_handle(int handle_id) + Use this after having set the new offset to use. + Returns 0 for success or -1 if the handle wasn't found. */ +int reset_handle(int handle_id) { DEBUGF("reset_handle(%d)\n", handle_id); + struct memory_handle *h = find_handle(handle_id); if (!h) return -1; @@ -450,6 +452,8 @@ void reset_handle(int handle_id) if (h->fd >= 0) { lseek(h->fd, h->offset, SEEK_SET); } + + return 0; } /* Free buffer space by moving the handle struct right before the useful -- 2.11.4.GIT