summaryrefslogtreecommitdiffstats
path: root/libqpdf/QUtil.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <jberkenbilt@users.noreply.github.com>2023-05-20 17:29:09 +0200
committerGitHub <noreply@github.com>2023-05-20 17:29:09 +0200
commitfd17c8e3fe38a56abf50ce0edec1cde48d4f74cb (patch)
treec1efea1b140cac94dbaf496ae6ec5e0a621daa07 /libqpdf/QUtil.cc
parenta6d7b79e65941238871c0c3d7d06b9bf246213ba (diff)
parente6577a1323cd813a92ddbc8841e1342c05de071a (diff)
downloadqpdf-fd17c8e3fe38a56abf50ce0edec1cde48d4f74cb.tar.zst
Merge pull request #963 from m-holger/tidy
Code tidy
Diffstat (limited to 'libqpdf/QUtil.cc')
-rw-r--r--libqpdf/QUtil.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/libqpdf/QUtil.cc b/libqpdf/QUtil.cc
index 03301d9d..a542736d 100644
--- a/libqpdf/QUtil.cc
+++ b/libqpdf/QUtil.cc
@@ -9,9 +9,8 @@
#include <qpdf/QPDFSystemError.hh>
#include <qpdf/QTC.hh>
-#include <cmath>
-#include <ctype.h>
-#include <errno.h>
+#include <cctype>
+#include <cerrno>
#include <fcntl.h>
#include <fstream>
#include <iomanip>
@@ -22,9 +21,9 @@
#include <set>
#include <sstream>
#include <stdexcept>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#ifndef QPDF_NO_WCHAR_T
# include <cwchar>
#endif
@@ -837,8 +836,8 @@ char*
QUtil::getWhoami(char* argv0)
{
char* whoami = nullptr;
- if (((whoami = strrchr(argv0, '/')) == NULL) &&
- ((whoami = strrchr(argv0, '\\')) == NULL)) {
+ if (((whoami = strrchr(argv0, '/')) == nullptr) &&
+ ((whoami = strrchr(argv0, '\\')) == nullptr)) {
whoami = argv0;
} else {
++whoami;