aboutsummaryrefslogtreecommitdiff
path: root/Documentation/perf_counter/util/quote.c
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/perf_counter/util/quote.c')
-rw-r--r--Documentation/perf_counter/util/quote.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Documentation/perf_counter/util/quote.c b/Documentation/perf_counter/util/quote.c
index 7a49fcf6967..f18c5212bc9 100644
--- a/Documentation/perf_counter/util/quote.c
+++ b/Documentation/perf_counter/util/quote.c
@@ -201,8 +201,9 @@ static size_t quote_c_style_counted(const char *name, ssize_t maxlen,
} while (0)
#define EMITBUF(s, l) \
do { \
+ int __ret; \
if (sb) strbuf_add(sb, (s), (l)); \
- if (fp) fwrite((s), (l), 1, fp); \
+ if (fp) __ret = fwrite((s), (l), 1, fp); \
count += (l); \
} while (0)
@@ -287,7 +288,9 @@ extern void write_name_quotedpfx(const char *pfx, size_t pfxlen,
quote_c_style(name, NULL, fp, 1);
fputc('"', fp);
} else {
- fwrite(pfx, pfxlen, 1, fp);
+ int ret;
+
+ ret = fwrite(pfx, pfxlen, 1, fp);
fputs(name, fp);
}
fputc(terminator, fp);