summaryrefslogtreecommitdiffstats
path: root/tun.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-07-18 20:46:06 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-07-18 20:46:06 +0000
commitcc1d3998d2edee5d69c07d5e0a750d7e47f5564d (patch)
tree1afa7014cf120c9b72223dba0a480cdbf4c5927f /tun.c
parentde6dbb5fe282eea69e5eaf0e922147a1a1ce5bf5 (diff)
downloadopenvpn-cc1d3998d2edee5d69c07d5e0a750d7e47f5564d.tar.gz
openvpn-cc1d3998d2edee5d69c07d5e0a750d7e47f5564d.tar.xz
openvpn-cc1d3998d2edee5d69c07d5e0a750d7e47f5564d.zip
Reverted some recent buffer.[ch] changes, including r3058 (except for
likely() and unlikely() macro additions to syshead.h) and r3061. I would like to give more thought to the bigger issue of fortifying buffer.[ch] through the use of additional defensive programming techniques. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3081 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'tun.c')
-rw-r--r--tun.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/tun.c b/tun.c
index bc3466b..c1494d9 100644
--- a/tun.c
+++ b/tun.c
@@ -2033,12 +2033,7 @@ tun_finalize (
}
if (buf)
- {
- if (ret < 0)
- buf->len = 0;
- else
- buf->len = ret;
- }
+ buf->len = ret;
return ret;
}