SHA256
1
0
forked from pool/libvirt

remove sexpr2string.patch now that it is in 0.7.1

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=12
This commit is contained in:
James Fehlig 2009-09-29 14:52:32 +00:00 committed by Git OBS Bridge
parent 21e21463c5
commit ace92d735c

View File

@ -1,27 +0,0 @@
From 1a1f8b9dbb68bf43c831e471ab4308d81a113ecd Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@novell.com>
Date: Tue, 25 Aug 2009 15:54:18 -0600
Subject: [PATCH] Fix sexpr2string() to handle empty list.
S-expression containing empty lists, e.g. (cpus (() () () ())),
was not being handled properly in sexpr2string() serialization.
Emit an empty list when encountering NIL sexpr kind.
---
src/sexpr.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
Index: libvirt-0.7.0/src/sexpr.c
===================================================================
--- libvirt-0.7.0.orig/src/sexpr.c
+++ libvirt-0.7.0/src/sexpr.c
@@ -255,6 +255,10 @@ sexpr2string(const struct sexpr * sexpr,
ret += tmp;
break;
case SEXPR_NIL:
+ tmp = snprintf(buffer + ret, n_buffer - ret, "()");
+ if (tmp == 0)
+ goto error;
+ ret += tmp;
break;
default:
goto error;