Skip to content

Commit

Permalink
Handle xs_write returning a bool rather than an int.
Browse files Browse the repository at this point in the history
Signed-off-by: John Else <john.else@citrix.com>
  • Loading branch information
johnelse committed Oct 25, 2012
1 parent 8cf977f commit 6708842
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ocaml/xenguest/xenguest_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ xenstore_putsv(int domid, const char *val, const char *fmt, va_list ap)
struct xs_handle *xsh = NULL;
int n, m, rc;
char key[1024];
bool success;

rc = 1;
bzero(key, sizeof(key));
Expand All @@ -110,7 +111,8 @@ xenstore_putsv(int domid, const char *val, const char *fmt, va_list ap)
if (m < 0)
goto out;

rc = xs_write(xsh, XBT_NULL, key, val, strlen(val));
success = xs_write(xsh, XBT_NULL, key, val, strlen(val));
rc = success? 0 : 1;
out:
xs_daemon_close(xsh);
free(path);
Expand Down

0 comments on commit 6708842

Please sign in to comment.