summaryrefslogtreecommitdiff
path: root/src/libstddjb/seek_set.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-01-23 15:58:24 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-01-23 15:58:24 +0000
commitaae36ab297feb6e934f478e7655c123d928651a7 (patch)
tree9e9fd41b742242b1e199f22605bd715e2ace8834 /src/libstddjb/seek_set.c
parent787d104bd528c47140b6e6f25b30682a02db60a5 (diff)
downloadskalibs-aae36ab297feb6e934f478e7655c123d928651a7.tar.xz
Bugfixes:v2.2.1.0
- seek_set now uses SEEK_SET (those functions are useless now, they will go at the next major version update) - skaclient_server_init now correctly sanitizes unixmessage_timed_receive
Diffstat (limited to 'src/libstddjb/seek_set.c')
-rw-r--r--src/libstddjb/seek_set.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libstddjb/seek_set.c b/src/libstddjb/seek_set.c
index b5883ac..70f6b0d 100644
--- a/src/libstddjb/seek_set.c
+++ b/src/libstddjb/seek_set.c
@@ -4,10 +4,7 @@
#include <unistd.h>
#include <skalibs/djbunix.h>
-#define SET 0 /* sigh */
-
int seek_set (int fd, long pos)
{
- if (lseek(fd, (off_t) pos, SET) == -1) return -1 ;
- return 0 ;
+ return lseek(fd, (off_t) pos, SEEK_SET) ;
}