summaryrefslogtreecommitdiff
path: root/pgsql.c
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-04-20 15:02:24 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-04-20 15:02:24 +0200
commita9f4cb486a76f9369386b3750c8571304f4503c6 (patch)
tree6878e83ceed246000305f0545616f0100c439da1 /pgsql.c
parentc3d9180d29a2ef7972420c6e1a558715285682e4 (diff)
downloadpgfuse-a9f4cb486a76f9369386b3750c8571304f4503c6.tar.gz
pgfuse-a9f4cb486a76f9369386b3750c8571304f4503c6.tar.bz2
-
Diffstat (limited to 'pgsql.c')
-rw-r--r--pgsql.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pgsql.c b/pgsql.c
index ba51f95..1527281 100644
--- a/pgsql.c
+++ b/pgsql.c
@@ -483,7 +483,7 @@ update_again:
} else if( offset == 0 && len < STANDARD_BLOCK_SIZE ) {
sprintf( sql, "UPDATE data set data = $3::bytea || substring( data from %u for %u ) WHERE dir_id=$1::int4 AND block_no=$2::int4",
- len + 1, STANDARD_BLOCK_SIZE - (unsigned int)len );
+ (unsigned int)len + 1, STANDARD_BLOCK_SIZE - (unsigned int)len );
/* keep data on the left */
} else if( offset > 0 && offset + len == STANDARD_BLOCK_SIZE ) {
@@ -496,7 +496,7 @@ update_again:
sprintf( sql, "UPDATE data set data = substring( data from %d for %d ) || $3::bytea || substring( data from %u for %u ) WHERE dir_id=$1::int4 AND block_no=$2::int4",
1, (unsigned int)offset,
- (unsigned int)offset + len + 1, STANDARD_BLOCK_SIZE - ( (unsigned int)offset + (unsigned int)len ) );
+ (unsigned int)offset + (unsigned int)len + 1, STANDARD_BLOCK_SIZE - ( (unsigned int)offset + (unsigned int)len ) );
/* we should never get here */
} else {