summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Baulig <martin@src.gnome.org>1999-05-06 22:10:04 +0000
committerMartin Baulig <martin@src.gnome.org>1999-05-06 22:10:04 +0000
commit3753ac5ee607c7609806ad32cdac9137aa17c318 (patch)
treea0c50ccaf30f8b1f96dff60ba88f395d275c9e1e /src
parent6120c5e4a8ce2b53d19650e0d545d5ee49676ada (diff)
downloadlibgtop-3753ac5ee607c7609806ad32cdac9137aa17c318.tar.gz
Applied a patch from David Kaelbling:
some compilers (like the SGI IRIX 6.x native one) enfore the "casts are not lvalues" maxim.
Diffstat (limited to 'src')
-rw-r--r--src/daemon/io.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/daemon/io.c b/src/daemon/io.c
index 1dc72aa3..aa38dd40 100644
--- a/src/daemon/io.c
+++ b/src/daemon/io.c
@@ -62,6 +62,7 @@ int
do_read (int s, void *ptr, size_t total_size)
{
int nread;
+ char *tmp_ptr;
size_t already_read = 0, remaining = total_size;
while (already_read < total_size) {
@@ -82,7 +83,10 @@ do_read (int s, void *ptr, size_t total_size)
already_read += nread;
remaining -= nread;
- (char *) ptr += nread;
+ /* (char *) ptr += nread; */
+ tmp_ptr = ptr;
+ tmp_ptr += nread;
+ ptr = tmp_ptr;
#ifdef REAL_DEBUG
fprintf (stderr, "READ (%d): %d - %d - %d\n",