diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2005-12-27 04:35:23 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2005-12-27 04:35:23 +0000 |
commit | f64db0fd960819d590696bbcd652b0e4e782bbb5 (patch) | |
tree | 2a4a26d7e26ca293a5d350b419f92ed3f114b0d5 | |
parent | dacdf491060e0b60aa540dc51f56b85d51bdc207 (diff) |
sizeof char is always 1
-rw-r--r-- | usr.bin/sdiff/sdiff.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/sdiff/sdiff.c b/usr.bin/sdiff/sdiff.c index f7dbab64551..4d9ed5a3d7a 100644 --- a/usr.bin/sdiff/sdiff.c +++ b/usr.bin/sdiff/sdiff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdiff.c,v 1.6 2005/12/27 04:33:31 tedu Exp $ */ +/* $OpenBSD: sdiff.c,v 1.7 2005/12/27 04:35:22 tedu Exp $ */ /* * Written by Raymond Lai <ray@cyth.net>. @@ -776,10 +776,10 @@ astrcat(char **s, const char *append) * the terminating NUL. `copied' includes the \n character. */ if (Dflag) - assert(offset + copied + sizeof((char)'\0') == newlen); + assert(offset + copied + 1 == newlen); /* Store generated string's values. */ - offset = newlen - sizeof((char)'\0'); + offset = newlen - 1; oldstr = *s; } |