diff options
author | 2005-12-27 04:35:22 +0000 | |
---|---|---|
committer | 2005-12-27 04:35:22 +0000 | |
commit | 3423b7bef647c16e12761a02b3e1753a3fc22c5d (patch) | |
tree | b1243deeead8fce76f976e6ce40658238f4b95f6 | |
parent | if an allocation function fails, err will print "cannot allocate memory" (diff) | |
download | wireguard-openbsd-3423b7bef647c16e12761a02b3e1753a3fc22c5d.tar.xz wireguard-openbsd-3423b7bef647c16e12761a02b3e1753a3fc22c5d.zip |
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; } |