Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/netpgp/dist/bindings/lua Minor renaming ...
details: https://anonhg.NetBSD.org/src/rev/fa8e73bacf9b
branches: trunk
changeset: 748242:fa8e73bacf9b
user: agc <agc%NetBSD.org@localhost>
date: Sun Oct 18 07:14:19 2009 +0000
description:
Minor renaming of lua array
Zero allocated storage after return from lua_newuserdata()
diffstat:
crypto/external/bsd/netpgp/dist/bindings/lua/glue.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 79a32ada013c -r fa8e73bacf9b crypto/external/bsd/netpgp/dist/bindings/lua/glue.c
--- a/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c Sun Oct 18 06:24:21 2009 +0000
+++ b/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c Sun Oct 18 07:14:19 2009 +0000
@@ -104,6 +104,7 @@
netpgp_t *netpgp;
netpgp = lua_newuserdata(L, sizeof(*netpgp));
+ (void) memset(netpgp, 0x0, sizeof(*netpgp));
set_homedir(netpgp, getenv("HOME"), "/.gnupg", 1);
netpgp_setvar(netpgp, "hash", DEFAULT_HASH_ALG);
return 1;
@@ -332,7 +333,7 @@
return 1;
}
-const struct luaL_reg libnetpgp[] = {
+const struct luaL_reg libluanetpgp[] = {
{ "new", l_new },
{ "init", l_init },
@@ -356,6 +357,6 @@
int
luaopen_netpgp(lua_State *L)
{
- luaL_openlib(L, "netpgp", libnetpgp, 0);
+ luaL_openlib(L, "netpgp", libluanetpgp, 0);
return 1;
}
Home |
Main Index |
Thread Index |
Old Index