summaryrefslogtreecommitdiff
path: root/src/textfile.c
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2011-05-10 11:24:12 +0200
committerJohan Hedberg <jh@dell.(none)>2011-05-15 01:47:08 +0300
commit995e8b35f4ea700ad76e81dc3f9a5d18f8c2ed09 (patch)
tree725c465fe4d4baf72d14167c183cac899b030876 /src/textfile.c
parente9119eb439026128e57cb2cdd88838981e61b948 (diff)
downloadbluez-995e8b35f4ea700ad76e81dc3f9a5d18f8c2ed09.tar.gz
Fix dead assignment in write_key
Diffstat (limited to 'src/textfile.c')
-rw-r--r--src/textfile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/textfile.c b/src/textfile.c
index d115ff6a0..089cce8b9 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);