[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 5/8] gentypes: make dispose function tolerate NULL
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxl/gentypes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libxl/gentypes.py b/tools/libxl/gentypes.py index cf5ec87..804cb59 100644 --- a/tools/libxl/gentypes.py +++ b/tools/libxl/gentypes.py @@ -641,6 +641,7 @@ if __name__ == '__main__': for ty in [t for t in types if t.dispose_fn is not None and t.autogenerate_dispose_fn]: f.write("void %s(%s)\n" % (ty.dispose_fn, ty.make_arg("p"))) f.write("{\n") + f.write(" if (!p) return;\n") f.write(libxl_C_type_dispose(ty, "p")) f.write("}\n") f.write("\n") -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |