Module Name: src Committed By: dsl Date: Wed Jan 2 10:33:19 UTC 2013
Modified Files: src/external/cddl/osnet/sys/sys: zfs_context.h Log Message: Replace alloca(256) with an array. The code ended up using alloca() from libc - which 'just can't work' (tm). It is also pointless! To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/external/cddl/osnet/sys/sys/zfs_context.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/cddl/osnet/sys/sys/zfs_context.h diff -u src/external/cddl/osnet/sys/sys/zfs_context.h:1.12 src/external/cddl/osnet/sys/sys/zfs_context.h:1.13 --- src/external/cddl/osnet/sys/sys/zfs_context.h:1.12 Mon Nov 21 17:51:03 2011 +++ src/external/cddl/osnet/sys/sys/zfs_context.h Wed Jan 2 10:33:19 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: zfs_context.h,v 1.12 2011/11/21 17:51:03 christos Exp $ */ +/* $NetBSD: zfs_context.h,v 1.13 2013/01/02 10:33:19 dsl Exp $ */ /* * CDDL HEADER START @@ -146,7 +146,7 @@ extern void vcmn_err(int, const char *, const TYPE __left = (TYPE)(LEFT); \ const TYPE __right = (TYPE)(RIGHT); \ if (!(__left OP __right)) { \ - char *__buf = alloca(256); \ + char __buf[256]; \ (void) snprintf(__buf, 256, "%s %s %s (0x%llx %s 0x%llx)", \ #LEFT, #OP, #RIGHT, \ (u_longlong_t)__left, #OP, (u_longlong_t)__right); \