if (qemuMonitorHMPCommand(mon, cmd, &reply))
goto cleanup;
- if (strstr(reply, "No block device supports snapshots") != NULL) {
+ if (strstr(reply, "No block device supports snapshots")) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("this domain does not have a device to delete snapshots"));
goto cleanup;
- } else if (strstr(reply, "Snapshots not supported on device") != NULL) {
+ } else if (strstr(reply, "Snapshots not supported on device")) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", reply);
goto cleanup;
- } else if (strstr(reply, "Error") != NULL
- && strstr(reply, "while deleting snapshot") != NULL) {
- virReportError(VIR_ERR_OPERATION_FAILED, "%s", reply);
+ } else if (strstr(reply, "Error") &&
+ strstr(reply, "while deleting snapshot")) {
+ virReportError(VIR_ERR_OPERATION_FAILED,
+ _("Failed to delete snapshot: %s"), reply);
goto cleanup;
}