diff options
author | stefanf <stefanf@FreeBSD.org> | 2004-06-08 13:08:19 +0000 |
---|---|---|
committer | stefanf <stefanf@FreeBSD.org> | 2004-06-08 13:08:19 +0000 |
commit | d7af95e86854bb648bd434fd649ebb4dafdc0d5c (patch) | |
tree | e1bd2b8e7503b487a4e9833e6073d750f2e8a0da /sys | |
parent | 3a40eb39cf8f6c4f2f7dcec9d4c3c600b7d6227c (diff) | |
download | FreeBSD-src-d7af95e86854bb648bd434fd649ebb4dafdc0d5c.zip FreeBSD-src-d7af95e86854bb648bd434fd649ebb4dafdc0d5c.tar.gz |
Avoid assignments to cast expressions.
Reviewed by: md5
Approved by: das (mentor)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/uipc_socket.c | 4 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_snapshot.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index efbfaf0..690c28a 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1748,7 +1748,7 @@ soopt_mcopyin(struct sockopt *sopt, struct mbuf *m) } else bcopy(sopt->sopt_val, mtod(m, char *), m->m_len); sopt->sopt_valsize -= m->m_len; - (caddr_t)sopt->sopt_val += m->m_len; + sopt->sopt_val = (char *)sopt->sopt_val + m->m_len; m = m->m_next; } if (m != NULL) /* should be allocated enoughly at ip6_sooptmcopyin() */ @@ -1778,7 +1778,7 @@ soopt_mcopyout(struct sockopt *sopt, struct mbuf *m) } else bcopy(mtod(m, char *), sopt->sopt_val, m->m_len); sopt->sopt_valsize -= m->m_len; - (caddr_t)sopt->sopt_val += m->m_len; + sopt->sopt_val = (char *)sopt->sopt_val + m->m_len; valsize += m->m_len; m = m->m_next; } diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index c91b492..b11b867 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -367,7 +367,7 @@ restart: space = malloc((u_long)size, M_UFSMNT, M_WAITOK); copy_fs->fs_csp = space; bcopy(fs->fs_csp, copy_fs->fs_csp, fs->fs_cssize); - (char *)space += fs->fs_cssize; + space = (char *)space + fs->fs_cssize; loc = howmany(fs->fs_cssize, fs->fs_fsize); i = fs->fs_frag - loc % fs->fs_frag; len = (i == fs->fs_frag) ? 0 : i * fs->fs_fsize; @@ -381,7 +381,7 @@ restart: goto out1; } bcopy(bp->b_data, space, (u_int)len); - (char *)space += len; + space = (char *)space + len; bp->b_flags |= B_INVAL | B_NOCACHE; brelse(bp); } |