diff options
author | 2012-12-03 19:26:24 +0000 | |
---|---|---|
committer | 2012-12-03 19:26:24 +0000 | |
commit | 225965cdc0ccba34d1cd54a2f7300406ab0dc1f6 (patch) | |
tree | 3a4fa85f2666b1c91a9a5f662f3a1abc51f9abe3 | |
parent | Remove server capability description from the documentation and from (diff) | |
download | wireguard-openbsd-225965cdc0ccba34d1cd54a2f7300406ab0dc1f6.tar.xz wireguard-openbsd-225965cdc0ccba34d1cd54a2f7300406ab0dc1f6.zip |
don't try to stuff ptr differences into an int; from Arto Jonsson; ok espie@
-rw-r--r-- | usr.bin/rs/rs.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/rs/rs.c b/usr.bin/rs/rs.c index e0d4054ca51..8e9a24292f1 100644 --- a/usr.bin/rs/rs.c +++ b/usr.bin/rs/rs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rs.c,v 1.21 2012/03/04 04:05:15 fgsch Exp $ */ +/* $OpenBSD: rs.c,v 1.22 2012/12/03 19:26:24 otto Exp $ */ /*- * Copyright (c) 1993 @@ -336,17 +336,16 @@ char ** getptrs(char **sp) { char **p; - int newsize, gap; + int newsize; newsize = allocsize * 2; p = realloc(elem, newsize * sizeof(char *)); if (p == NULL) err(1, "no memory"); - gap = p - elem; - elem = p; allocsize = newsize; - sp += gap; + sp += p - elem; + elem = p; endelem = elem + allocsize; return(sp); } |