Diff between e9119eb439026128e57cb2cdd88838981e61b948 and 995e8b35f4ea700ad76e81dc3f9a5d18f8c2ed09

Changed Files

File Additions Deletions Status
src/textfile.c +5 -5 modified

Full Patch

diff --git a/src/textfile.c b/src/textfile.c
index d115ff6..089cce8 100644
--- a/src/textfile.c
+++ b/src/textfile.c
@@ -182,7 +182,7 @@ static int write_key(const char *pathname, const char *key, const char *value, i
 {
 	struct stat st;
 	char *map, *off, *end, *str;
-	off_t size, pos; size_t base;
+	off_t size; size_t base;
 	int fd, len, err = 0;
 
 	fd = open(pathname, O_RDWR);
@@ -203,7 +203,7 @@ static int write_key(const char *pathname, const char *key, const char *value, i
 
 	if (!size) {
 		if (value) {
-			pos = lseek(fd, size, SEEK_SET);
+			lseek(fd, size, SEEK_SET);
 			err = write_key_value(fd, key, value);
 		}
 		goto unlock;
@@ -221,7 +221,7 @@ static int write_key(const char *pathname, const char *key, const char *value, i
 	if (!off) {
 		if (value) {
 			munmap(map, size);
-			pos = lseek(fd, size, SEEK_SET);
+			lseek(fd, size, SEEK_SET);
 			err = write_key_value(fd, key, value);
 		}
 		goto unlock;
@@ -249,7 +249,7 @@ static int write_key(const char *pathname, const char *key, const char *value, i
 			err = errno;
 			goto unlock;
 		}
-		pos = lseek(fd, base, SEEK_SET);
+		lseek(fd, base, SEEK_SET);
 		if (value)
 			err = write_key_value(fd, key, value);
 
@@ -275,7 +275,7 @@ static int write_key(const char *pathname, const char *key, const char *value, i
 		free(str);
 		goto unlock;
 	}
-	pos = lseek(fd, base, SEEK_SET);
+	lseek(fd, base, SEEK_SET);
 	if (value)
 		err = write_key_value(fd, key, value);