summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2024-03-07 10:08:25 -0600
committerG. Branden Robinson <g.branden.robinson@gmail.com>2024-03-07 10:22:07 -0600
commit602b90042974d83b950430351f61126a58200067 (patch)
tree27725c613124dcd0f693d8fa933f902e88c83f65
parentd452bf8f8342b69dcfa85ea927ab7c1e0fab7c57 (diff)
[troff]: Fix code style nits.
Annotate null pointers with `nullptr` comment to ease any future transition to C++11, which defines it as a keyword.
-rw-r--r--src/roff/troff/node.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 3f621efc5..0240d0501 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -1666,16 +1666,16 @@ real_output_file::~real_output_file()
is_dying = true;
// To avoid looping, set fp to 0 before calling fatal().
if (ferror(fp)) {
- fp = 0;
+ fp = 0 /* nullptr */;
fatal("error on output file stream");
}
else if (fflush(fp) < 0) {
- fp = 0;
+ fp = 0 /* nullptr */;
fatal("unable to flush output file: %1", strerror(errno));
}
if (piped) {
int result = pclose(fp);
- fp = 0;
+ fp = 0 /* nullptr */;
if (result < 0)
fatal("unable to close pipe: %1", strerror(errno));
if (!WIFEXITED(result))
@@ -1691,7 +1691,7 @@ real_output_file::~real_output_file()
}
else
if (fclose(fp) < 0) {
- fp = 0;
+ fp = 0 /* nullptr */;
fatal("unable to close output file: %1", strerror(errno));
}
}
@@ -1700,7 +1700,7 @@ void real_output_file::flush()
{
// To avoid looping, set fp to 0 before calling fatal().
if (fflush(fp) < 0) {
- fp = 0;
+ fp = 0 /* nullptr */;
fatal("unable to flush output file: %1", strerror(errno));
}
}