From: Hallvard Furuseth Date: Sat, 9 Jun 2007 23:41:36 +0000 (+0000) Subject: ITS#5007: Remove void* pointer arithmetic, that's a gcc extension. X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~402 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bfdb026fab9bc1ffe3672cdfa40cca6cfeade7c6;p=openldap ITS#5007: Remove void* pointer arithmetic, that's a gcc extension. --- diff --git a/libraries/liblber/sockbuf.c b/libraries/liblber/sockbuf.c index 9659d6a6f9..176122ec2a 100644 --- a/libraries/liblber/sockbuf.c +++ b/libraries/liblber/sockbuf.c @@ -724,7 +724,7 @@ sb_fd_read( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len ) if ( blen > len ) blen = len; AC_MEMCPY( buf, sbiod->sbiod_sb->sb_ungetbuf, blen ); - buf += blen; + buf = (char *) buf + blen; len -= blen; sbiod->sbiod_sb->sb_ungetlen -= blen; if ( sbiod->sbiod_sb->sb_ungetlen ) { @@ -914,7 +914,7 @@ sb_dgram_read( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len ) addrlen = sizeof( struct sockaddr ); src = buf; - buf += addrlen; + buf = (char *) buf + addrlen; len -= addrlen; rc = recvfrom( sbiod->sbiod_sb->sb_fd, buf, len, 0, src, &addrlen ); @@ -932,7 +932,7 @@ sb_dgram_write( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len ) assert( buf != NULL ); dst = buf; - buf += sizeof( struct sockaddr ); + buf = (char *) buf + sizeof( struct sockaddr ); len -= sizeof( struct sockaddr ); rc = sendto( sbiod->sbiod_sb->sb_fd, buf, len, 0, dst,