This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=398844386310471db42a7af98bf885e4162728f2

commit 398844386310471db42a7af98bf885e4162728f2
Author: Guillem Jover <[email protected]>
AuthorDate: Tue Feb 4 04:06:24 2020 +0100

    dselect: Use nullptr instead of NULL
    
    Warned-by: clang-10 -Wzero-as-null-pointer-constant
---
 debian/changelog     | 1 +
 dselect/method.cc    | 4 ++--
 dselect/methparse.cc | 4 ++--
 dselect/pkglist.cc   | 2 +-
 4 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index df43912e8..d396d9a4a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -188,6 +188,7 @@ dpkg (1.20.0) UNRELEASED; urgency=medium
       string arguments on dependency printer.
     - dselect: Reorder branches in packagelist::deselect_one_of so that they
       are not duplicated.
+    - dselect: Use nullptr instead of NULL.
   * Build system:
     - Bump minimal Perl version to 5.24.1.
     - Add a serial versioning to the m4 files.
diff --git a/dselect/method.cc b/dselect/method.cc
index 3d310e75e..b8a5cfdb9 100644
--- a/dselect/method.cc
+++ b/dselect/method.cc
@@ -70,8 +70,8 @@ sthfailed(const char * reasoning)
 static void cu_unlockmethod(int, void**) {
   struct flock fl;
 
-  if (methodlockfile == NULL)
-    internerr("method lock file is NULL");
+  if (methodlockfile == nullptr)
+    internerr("method lock file is nullptr");
   if (methlockfd < 0)
     internerr("method lock fd is %d < 0", methlockfd);
   fl.l_type=F_UNLCK; fl.l_whence= SEEK_SET; fl.l_start=fl.l_len=0;
diff --git a/dselect/methparse.cc b/dselect/methparse.cc
index a1ab31a8b..a667319ca 100644
--- a/dselect/methparse.cc
+++ b/dselect/methparse.cc
@@ -291,8 +291,8 @@ void getcurrentopt() {
 void writecurrentopt() {
   struct atomic_file *file;
 
-  if (methoptfile == NULL)
-    internerr("method options filename is NULL");
+  if (methoptfile == nullptr)
+    internerr("method options filename is nullptr");
 
   file = atomic_file_new(methoptfile, (enum atomic_file_flags)0);
   atomic_file_open(file);
diff --git a/dselect/pkglist.cc b/dselect/pkglist.cc
index 9882802bb..2efb80f92 100644
--- a/dselect/pkglist.cc
+++ b/dselect/pkglist.cc
@@ -293,7 +293,7 @@ void packagelist::sortmakeheads() {
   int a;
   for (a=0; a<nrealitems; a++) {
     thispkg= table[a]->pkg;
-    if (thispkg->set->name == NULL)
+    if (thispkg->set->name == nullptr)
       internerr("package set has no name at table index %d", a);
     int ssdiff= 0;
     ssavailval ssavail= ssa_none;

-- 
Dpkg.Org's dpkg

Reply via email to