Page MenuHomeFreeBSD

D15548.id42969.diff
No OneTemporary

D15548.id42969.diff

Index: usr.sbin/bhyve/acpi.c
===================================================================
--- usr.sbin/bhyve/acpi.c
+++ usr.sbin/bhyve/acpi.c
@@ -118,18 +118,14 @@
};
#define EFPRINTF(...) \
- err = fprintf(__VA_ARGS__); if (err < 0) goto err_exit;
+ if (fprintf(__VA_ARGS__) < 0) goto err_exit;
#define EFFLUSH(x) \
- err = fflush(x); if (err != 0) goto err_exit;
+ if (fflush(x) != 0) goto err_exit;
static int
basl_fwrite_rsdp(FILE *fp)
{
- int err;
-
- err = 0;
-
EFPRINTF(fp, "/*\n");
EFPRINTF(fp, " * bhyve RSDP template\n");
EFPRINTF(fp, " */\n");
@@ -156,10 +152,6 @@
static int
basl_fwrite_rsdt(FILE *fp)
{
- int err;
-
- err = 0;
-
EFPRINTF(fp, "/*\n");
EFPRINTF(fp, " * bhyve RSDT template\n");
EFPRINTF(fp, " */\n");
@@ -196,10 +188,6 @@
static int
basl_fwrite_xsdt(FILE *fp)
{
- int err;
-
- err = 0;
-
EFPRINTF(fp, "/*\n");
EFPRINTF(fp, " * bhyve XSDT template\n");
EFPRINTF(fp, " */\n");
@@ -236,11 +224,8 @@
static int
basl_fwrite_madt(FILE *fp)
{
- int err;
int i;
- err = 0;
-
EFPRINTF(fp, "/*\n");
EFPRINTF(fp, " * bhyve MADT template\n");
EFPRINTF(fp, " */\n");
@@ -326,10 +311,6 @@
static int
basl_fwrite_fadt(FILE *fp)
{
- int err;
-
- err = 0;
-
EFPRINTF(fp, "/*\n");
EFPRINTF(fp, " * bhyve FADT template\n");
EFPRINTF(fp, " */\n");
@@ -547,10 +528,6 @@
static int
basl_fwrite_hpet(FILE *fp)
{
- int err;
-
- err = 0;
-
EFPRINTF(fp, "/*\n");
EFPRINTF(fp, " * bhyve HPET template\n");
EFPRINTF(fp, " */\n");
@@ -596,8 +573,6 @@
static int
basl_fwrite_mcfg(FILE *fp)
{
- int err = 0;
-
EFPRINTF(fp, "/*\n");
EFPRINTF(fp, " * bhyve MCFG template\n");
EFPRINTF(fp, " */\n");
@@ -629,10 +604,6 @@
static int
basl_fwrite_facs(FILE *fp)
{
- int err;
-
- err = 0;
-
EFPRINTF(fp, "/*\n");
EFPRINTF(fp, " * bhyve FACS template\n");
EFPRINTF(fp, " */\n");
@@ -666,7 +637,6 @@
dsdt_line(const char *fmt, ...)
{
va_list ap;
- int err;
if (dsdt_error != 0)
return;
@@ -675,8 +645,10 @@
if (dsdt_indent_level != 0)
EFPRINTF(dsdt_fp, "%*c", dsdt_indent_level * 2, ' ');
va_start(ap, fmt);
- if (vfprintf(dsdt_fp, fmt, ap) < 0)
+ if (vfprintf(dsdt_fp, fmt, ap) < 0) {
+ va_end(ap);
goto err_exit;
+ }
va_end(ap);
}
EFPRINTF(dsdt_fp, "\n");
@@ -735,9 +707,6 @@
static int
basl_fwrite_dsdt(FILE *fp)
{
- int err;
-
- err = 0;
dsdt_fp = fp;
dsdt_error = 0;
dsdt_indent_level = 0;

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 1, 1:50 PM (57 m, 44 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28381675
Default Alt Text
D15548.id42969.diff (2 KB)

Event Timeline