[ltrace-commits] 06/07: Forbid adding naked voids as structure members
Petr Machata
pmachata-guest at moszumanska.debian.org
Fri Jan 16 19:32:40 UTC 2015
This is an automated email from the git hooks/post-receive script.
pmachata-guest pushed a commit to branch master
in repository ltrace.
commit 2ed45cdefcac370fc1eb09432297b72fd54b0011
Author: Petr Machata <pmachata at redhat.com>
Date: Fri Jan 16 18:35:36 2015 +0100
Forbid adding naked voids as structure members
---
type.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/type.c b/type.c
index 6128085..0db94f3 100644
--- a/type.c
+++ b/type.c
@@ -1,6 +1,6 @@
/*
* This file is part of ltrace.
- * Copyright (C) 2011,2012,2013 Petr Machata, Red Hat Inc.
+ * Copyright (C) 2011,2012,2013,2015 Petr Machata, Red Hat Inc.
* Copyright (C) 2007,2008 Juan Cespedes
*
* This program is free software; you can redistribute it and/or
@@ -97,6 +97,7 @@ type_struct_add(struct arg_type_info *info,
struct arg_type_info *field_info, int own)
{
assert(info->type == ARGTYPE_STRUCT);
+ assert(field_info->type != ARGTYPE_VOID);
struct struct_field field = { field_info, own };
return VECT_PUSHBACK(&info->u.entries, &field);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/ltrace.git
More information about the ltrace-commits
mailing list