summaryrefslogtreecommitdiffstats
path: root/net/base/nss_memio.c
diff options
context:
space:
mode:
authormaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-10 17:39:46 +0000
committermaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-10 17:39:46 +0000
commit72d1e597c85fbf6b45756e3c753696370c48c042 (patch)
treed01609d62295e34aa3a5721d4109f815d0fd23ad /net/base/nss_memio.c
parent9475d1d189c03a0626c4855b38f6004bfe7c5bb8 (diff)
downloadchromium_src-72d1e597c85fbf6b45756e3c753696370c48c042.zip
chromium_src-72d1e597c85fbf6b45756e3c753696370c48c042.tar.gz
chromium_src-72d1e597c85fbf6b45756e3c753696370c48c042.tar.bz2
Slight code change to make some global variables const.
Fix >80 cols lines. Review URL: http://codereview.chromium.org/42013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11342 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/nss_memio.c')
-rw-r--r--net/base/nss_memio.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/net/base/nss_memio.c b/net/base/nss_memio.c
index f32ca5d..d92adf6 100644
--- a/net/base/nss_memio.c
+++ b/net/base/nss_memio.c
@@ -168,14 +168,14 @@ static int memio_buffer_put(struct memio_buffer *mb, const char *buf, int n)
transferred += len;
/* Handle part after wrap */
- len = PR_MIN(n, memio_buffer_unused_contiguous(mb));
- if (len > 0) {
+ len = PR_MIN(n, memio_buffer_unused_contiguous(mb));
+ if (len > 0) {
/* Output buffer still not full, input buffer still not empty */
- memcpy(&mb->buf[mb->tail], buf, len);
- mb->tail += len;
+ memcpy(&mb->buf[mb->tail], buf, len);
+ mb->tail += len;
if (mb->tail == mb->bufsize)
mb->tail = 0;
- transferred += len;
+ transferred += len;
}
}
@@ -201,13 +201,13 @@ static int memio_buffer_get(struct memio_buffer *mb, char *buf, int n)
transferred += len;
/* Handle part after wrap */
- len = PR_MIN(n, memio_buffer_used_contiguous(mb));
- if (len) {
- memcpy(buf, &mb->buf[mb->head], len);
- mb->head += len;
+ len = PR_MIN(n, memio_buffer_used_contiguous(mb));
+ if (len) {
+ memcpy(buf, &mb->buf[mb->head], len);
+ mb->head += len;
if (mb->head == mb->bufsize)
mb->head = 0;
- transferred += len;
+ transferred += len;
}
}
@@ -429,7 +429,7 @@ void memio_PutReadResult(memio_Private *secret, int bytes_read)
if (bytes_read > 0) {
mb->tail += bytes_read;
if (mb->tail == mb->bufsize)
- mb->tail = 0;
+ mb->tail = 0;
} else if (bytes_read == 0) {
/* Record EOF condition and report to caller when buffer runs dry */
((PRFilePrivate *)secret)->eof = PR_TRUE;
@@ -472,8 +472,8 @@ void memio_PutWriteResult(memio_Private *secret, int bytes_written)
#define CHECKEQ(a, b) { \
if ((a) != (b)) { \
- printf("%d != %d, Test failed line %d\n", a, b, __LINE__); \
- exit(1); \
+ printf("%d != %d, Test failed line %d\n", a, b, __LINE__); \
+ exit(1); \
} \
}