Sfoglia il codice sorgente

Use NULL instead of '(char *)0'.

Guillem Jover 19 anni fa
parent
commit
4e5846ccd3
9 ha cambiato i file con 53 aggiunte e 34 eliminazioni
  1. 15 0
      ChangeLog
  2. 5 3
      dpkg-deb/build.c
  3. 3 2
      dpkg-deb/extract.c
  4. 3 2
      dpkg-deb/info.c
  5. 9 9
      src/cleanup.c
  6. 2 2
      src/configure.c
  7. 3 3
      src/help.c
  8. 10 10
      src/processarc.c
  9. 3 3
      src/remove.c

+ 15 - 0
ChangeLog

@@ -1,3 +1,18 @@
+2007-08-08  Guillem Jover  <guillem@debian.org>
+
+	* dpkg-deb/build.c (do_build): Use NULL instead of '(char *)0'.
+	* dpkg-deb/extract.c (movecontrolfiles, extracthalf): Likewise.
+	* dpkg-deb/info.c (cu_info_prepare, info_prepare): Likewise.
+	* src/cleanup.c (cu_prermupgrade, cu_prermdeconfigure)
+	(cu_prerminfavour, cu_preinstverynew, cu_preinstnew)
+	(cu_preinstupgrade, cu_postrmupgrade, cu_prermremove): Likewise.
+	* src/configure.c (deferred_configure, suspend): Likewise.
+	* src/help.c (maintainer_script_alternative)
+	(ensure_pathname_nonexisting): Likewise.
+	* src/processarc.c (process_archive): Likewise.
+	* src/remove.c (deferred_remove, removal_bulk_remove_files)
+	(removal_bulk_remove_configfiles): Likewise.
+
 2007-08-08  Guillem Jover  <guillem@debian.org>
 2007-08-08  Guillem Jover  <guillem@debian.org>
 
 
 	* src/cleanup.c (cu_prermdeconfigure): Split call to
 	* src/cleanup.c (cu_prermdeconfigure): Split call to

+ 5 - 3
dpkg-deb/build.c

@@ -324,7 +324,8 @@ void do_build(const char *const *argv) {
     m_dup2(p1[1],1); close(p1[0]); close(p1[1]);
     m_dup2(p1[1],1); close(p1[0]); close(p1[1]);
     if (chdir(directory)) ohshite(_("failed to chdir to `%.255s'"),directory);
     if (chdir(directory)) ohshite(_("failed to chdir to `%.255s'"),directory);
     if (chdir(BUILDCONTROLDIR)) ohshite(_("failed to chdir to .../DEBIAN"));
     if (chdir(BUILDCONTROLDIR)) ohshite(_("failed to chdir to .../DEBIAN"));
-    execlp(TAR,"tar","-cf","-",".",(char*)0); ohshite(_("failed to exec tar -cf"));
+    execlp(TAR, "tar", "-cf", "-", ".", NULL);
+    ohshite(_("failed to exec tar -cf"));
   }
   }
   close(p1[1]);
   close(p1[1]);
   /* Create a temporary file to store the control data in. Immediately unlink
   /* Create a temporary file to store the control data in. Immediately unlink
@@ -396,7 +397,7 @@ void do_build(const char *const *argv) {
     m_dup2(p1[0],0); close(p1[0]); close(p1[1]);
     m_dup2(p1[0],0); close(p1[0]); close(p1[1]);
     m_dup2(p2[1],1); close(p2[0]); close(p2[1]);
     m_dup2(p2[1],1); close(p2[0]); close(p2[1]);
     if (chdir(directory)) ohshite(_("failed to chdir to `%.255s'"),directory);
     if (chdir(directory)) ohshite(_("failed to chdir to `%.255s'"),directory);
-    execlp(TAR,"tar","-cf", "-", "--null", "-T", "-", "--no-recursion", (char*)0);
+    execlp(TAR, "tar", "-cf", "-", "--null", "-T", "-", "--no-recursion", NULL);
     ohshite(_("failed to exec tar -cf"));
     ohshite(_("failed to exec tar -cf"));
   }
   }
   close(p1[0]);
   close(p1[0]);
@@ -417,7 +418,8 @@ void do_build(const char *const *argv) {
   if (!(c3= m_fork())) {
   if (!(c3= m_fork())) {
     m_dup2(p3[1],1); close(p3[0]); close(p3[1]);
     m_dup2(p3[1],1); close(p3[0]); close(p3[1]);
     if (chdir(directory)) ohshite(_("failed to chdir to `%.255s'"),directory);
     if (chdir(directory)) ohshite(_("failed to chdir to `%.255s'"),directory);
-    execlp(FIND,"find",".","-path","./" BUILDCONTROLDIR,"-prune","-o","-print0",(char*)0);
+    execlp(FIND, "find", ".", "-path", "./" BUILDCONTROLDIR, "-prune", "-o",
+           "-print0", NULL);
     ohshite(_("failed to exec find"));
     ohshite(_("failed to exec find"));
   }
   }
   close(p3[1]);
   close(p3[1]);

+ 3 - 2
dpkg-deb/extract.c

@@ -48,7 +48,8 @@ static void movecontrolfiles(const char *thing) {
   
   
   sprintf(buf, "mv %s/* . && rmdir %s", thing, thing);
   sprintf(buf, "mv %s/* . && rmdir %s", thing, thing);
   if (!(c1= m_fork())) {
   if (!(c1= m_fork())) {
-    execlp("sh","sh","-c",buf,(char*)0); ohshite(_("failed to exec sh -c mv foo/* &c"));
+    execlp("sh", "sh", "-c", buf, NULL);
+    ohshite(_("failed to exec sh -c mv foo/* &c"));
   }
   }
   waitsubproc(c1,"sh -c mv foo/* &c",0);
   waitsubproc(c1,"sh -c mv foo/* &c",0);
 }
 }
@@ -299,7 +300,7 @@ void extracthalf(const char *debar, const char *directory,
       strcat(buffer, "f");
       strcat(buffer, "f");
       m_dup2(p2[0],0);
       m_dup2(p2[0],0);
       close(p2[0]);
       close(p2[0]);
-      execlp(TAR,"tar",buffer,"-",(char*)0);
+      execlp(TAR, "tar", buffer, "-", NULL);
       ohshite(_("failed to exec tar"));
       ohshite(_("failed to exec tar"));
     }
     }
     close(p2[0]);
     close(p2[0]);

+ 3 - 2
dpkg-deb/info.c

@@ -50,7 +50,7 @@ static void cu_info_prepare(int argc, void **argv) {
   if (lstat(directory,&stab) && errno==ENOENT) return;
   if (lstat(directory,&stab) && errno==ENOENT) return;
   if ((c1= fork()) == -1) { perror(_("failed to fork for cleanup")); return; }
   if ((c1= fork()) == -1) { perror(_("failed to fork for cleanup")); return; }
   if (!c1) {
   if (!c1) {
-    execlp(RM,"rm","-rf",directory,(char*)0);
+    execlp(RM, "rm", "-rf", directory, NULL);
     perror(_("failed to exec rm for cleanup")); _exit(1);
     perror(_("failed to exec rm for cleanup")); _exit(1);
   }
   }
   if (waitpid(c1,&status,0) != c1) { perror(_("failed to wait for rm cleanup")); return; }
   if (waitpid(c1,&status,0) != c1) { perror(_("failed to wait for rm cleanup")); return; }
@@ -72,7 +72,8 @@ static void info_prepare(const char *const **argvp,
   *directoryp= dbuf;
   *directoryp= dbuf;
 
 
   if (!(c1= m_fork())) {
   if (!(c1= m_fork())) {
-    execlp(RM,"rm","-rf",dbuf,(char*)0); ohshite(_("failed to exec rm -rf"));
+    execlp(RM, "rm", "-rf", dbuf, NULL);
+    ohshite(_("failed to exec rm -rf"));
   }
   }
   waitsubproc(c1,"rm -rf",0);
   waitsubproc(c1,"rm -rf",0);
   push_cleanup(cu_info_prepare,-1, 0,0, 1, (void*)dbuf);
   push_cleanup(cu_info_prepare,-1, 0,0, 1, (void*)dbuf);

+ 9 - 9
src/cleanup.c

@@ -111,7 +111,7 @@ void cu_prermupgrade(int argc, void **argv) {
                               "abort-upgrade",
                               "abort-upgrade",
                               versiondescribe(&pkg->available.version,
                               versiondescribe(&pkg->available.version,
                                               vdew_nonambig),
                                               vdew_nonambig),
-                              (char*)0);
+                              NULL);
   pkg->status= stat_installed;
   pkg->status= stat_installed;
   pkg->eflag &= ~eflagf_reinstreq;
   pkg->eflag &= ~eflagf_reinstreq;
   modstatdb_note(pkg);
   modstatdb_note(pkg);
@@ -141,14 +141,14 @@ void cu_prermdeconfigure(int argc, void **argv) {
                                 "removing", conflictor->name,
                                 "removing", conflictor->name,
                                 versiondescribe(&conflictor->installed.version,
                                 versiondescribe(&conflictor->installed.version,
                                                 vdew_nonambig),
                                                 vdew_nonambig),
-                                (char*)0);
+                                NULL);
   } else {
   } else {
     maintainer_script_installed(deconf, POSTINSTFILE, "post-installation",
     maintainer_script_installed(deconf, POSTINSTFILE, "post-installation",
                                 "abort-deconfigure",
                                 "abort-deconfigure",
                                 "in-favour", infavour->name,
                                 "in-favour", infavour->name,
                                 versiondescribe(&infavour->available.version,
                                 versiondescribe(&infavour->available.version,
                                                 vdew_nonambig),
                                                 vdew_nonambig),
-                                (char*)0);
+                                NULL);
   }
   }
 
 
   deconf->status= stat_installed;
   deconf->status= stat_installed;
@@ -164,7 +164,7 @@ void cu_prerminfavour(int argc, void **argv) {
                               "abort-remove", "in-favour", infavour->name,
                               "abort-remove", "in-favour", infavour->name,
                               versiondescribe(&infavour->available.version,
                               versiondescribe(&infavour->available.version,
                                               vdew_nonambig),
                                               vdew_nonambig),
-                              (char*)0);
+                              NULL);
   conflictor->status= stat_installed;
   conflictor->status= stat_installed;
   conflictor->eflag &= ~eflagf_reinstreq;
   conflictor->eflag &= ~eflagf_reinstreq;
   modstatdb_note(conflictor);
   modstatdb_note(conflictor);
@@ -178,7 +178,7 @@ void cu_preinstverynew(int argc, void **argv) {
 
 
   if (cleanup_pkg_failed++) return;
   if (cleanup_pkg_failed++) return;
   maintainer_script_new(pkg->name, POSTRMFILE,"post-removal",cidir,cidirrest,
   maintainer_script_new(pkg->name, POSTRMFILE,"post-removal",cidir,cidirrest,
-                        "abort-install",(char*)0);
+                        "abort-install", NULL);
   pkg->status= stat_notinstalled;
   pkg->status= stat_notinstalled;
   pkg->eflag &= ~eflagf_reinstreq;
   pkg->eflag &= ~eflagf_reinstreq;
   blankpackageperfile(&pkg->installed);
   blankpackageperfile(&pkg->installed);
@@ -195,7 +195,7 @@ void cu_preinstnew(int argc, void **argv) {
   maintainer_script_new(pkg->name, POSTRMFILE,"post-removal",cidir,cidirrest,
   maintainer_script_new(pkg->name, POSTRMFILE,"post-removal",cidir,cidirrest,
                         "abort-install", versiondescribe(&pkg->installed.version,
                         "abort-install", versiondescribe(&pkg->installed.version,
                                                          vdew_nonambig),
                                                          vdew_nonambig),
-                        (char*)0);
+                        NULL);
   pkg->status= stat_configfiles;
   pkg->status= stat_configfiles;
   pkg->eflag &= ~eflagf_reinstreq;
   pkg->eflag &= ~eflagf_reinstreq;
   modstatdb_note(pkg);
   modstatdb_note(pkg);
@@ -213,7 +213,7 @@ void cu_preinstupgrade(int argc, void **argv) {
                         "abort-upgrade",
                         "abort-upgrade",
                         versiondescribe(&pkg->installed.version,
                         versiondescribe(&pkg->installed.version,
                                         vdew_nonambig),
                                         vdew_nonambig),
-                        (char*)0);
+                        NULL);
   pkg->status= *oldstatusp;
   pkg->status= *oldstatusp;
   pkg->eflag &= ~eflagf_reinstreq;
   pkg->eflag &= ~eflagf_reinstreq;
   modstatdb_note(pkg);
   modstatdb_note(pkg);
@@ -227,7 +227,7 @@ void cu_postrmupgrade(int argc, void **argv) {
   maintainer_script_installed(pkg,PREINSTFILE,"pre-installation",
   maintainer_script_installed(pkg,PREINSTFILE,"pre-installation",
                               "abort-upgrade", versiondescribe(&pkg->available.version,
                               "abort-upgrade", versiondescribe(&pkg->available.version,
                                                                vdew_nonambig),
                                                                vdew_nonambig),
-                              (char*)0);
+                              NULL);
   cleanup_pkg_failed--;
   cleanup_pkg_failed--;
 }
 }
 
 
@@ -236,7 +236,7 @@ void cu_prermremove(int argc, void **argv) {
 
 
   if (cleanup_pkg_failed++) return;
   if (cleanup_pkg_failed++) return;
   maintainer_script_installed(pkg,POSTINSTFILE,"post-installation",
   maintainer_script_installed(pkg,POSTINSTFILE,"post-installation",
-                              "abort-remove", (char*)0);
+                              "abort-remove", NULL);
   pkg->status= stat_installed;
   pkg->status= stat_installed;
   pkg->eflag &= ~eflagf_reinstreq;
   pkg->eflag &= ~eflagf_reinstreq;
   modstatdb_note(pkg);
   modstatdb_note(pkg);

+ 2 - 2
src/configure.c

@@ -303,7 +303,7 @@ void deferred_configure(struct pkginfo *pkg) {
 				? versiondescribe(&pkg->configversion,
 				? versiondescribe(&pkg->configversion,
 					vdew_nonambig)
 					vdew_nonambig)
 				: "",
 				: "",
-				(char*)0))
+				NULL))
 		putchar('\n');
 		putchar('\n');
 
 
 	pkg->status= stat_installed;
 	pkg->status= stat_installed;
@@ -504,7 +504,7 @@ static void suspend(void) {
 			if (!s || !*s)
 			if (!s || !*s)
 				s=DEFAULTSHELL;
 				s=DEFAULTSHELL;
 
 
-			execlp(s,s,"-i",(char*)0);
+			execlp(s, s, "-i", NULL);
 			ohshite(_("failed to exec shell (%.250s)"),s);
 			ohshite(_("failed to exec shell (%.250s)"),s);
 		}
 		}
 
 

+ 3 - 3
src/help.c

@@ -348,7 +348,7 @@ int maintainer_script_alternative(struct pkginfo *pkg,
   arglist= buildarglist(scriptname,
   arglist= buildarglist(scriptname,
                         ifok,versiondescribe(&pkg->available.version,
                         ifok,versiondescribe(&pkg->available.version,
                                              vdew_nonambig),
                                              vdew_nonambig),
-                        (char*)0);
+                        NULL);
   sprintf(buf,_("old %s script"),description);
   sprintf(buf,_("old %s script"),description);
   if (stat(oldscriptpath,&stab)) {
   if (stat(oldscriptpath,&stab)) {
     if (errno == ENOENT) {
     if (errno == ENOENT) {
@@ -369,7 +369,7 @@ int maintainer_script_alternative(struct pkginfo *pkg,
   arglist= buildarglist(scriptname,
   arglist= buildarglist(scriptname,
                         iffallback,versiondescribe(&pkg->installed.version,
                         iffallback,versiondescribe(&pkg->installed.version,
                                                    vdew_nonambig),
                                                    vdew_nonambig),
-                        (char*)0);
+                        NULL);
   strcpy(cidirrest,scriptname);
   strcpy(cidirrest,scriptname);
   sprintf(buf,_("new %s script"),description);
   sprintf(buf,_("new %s script"),description);
 
 
@@ -515,7 +515,7 @@ void ensure_pathname_nonexisting(const char *pathname) {
   }
   }
   c1= m_fork();
   c1= m_fork();
   if (!c1) {
   if (!c1) {
-    execlp(RM,"rm","-rf","--",pathname,(char*)0);
+    execlp(RM, "rm", "-rf", "--", pathname, NULL);
     ohshite(_("failed to exec rm for cleanup"));
     ohshite(_("failed to exec rm for cleanup"));
   }
   }
   debug(dbg_eachfile,"ensure_pathname_nonexisting running rm -rf");
   debug(dbg_eachfile,"ensure_pathname_nonexisting running rm -rf");

+ 10 - 10
src/processarc.c

@@ -113,7 +113,7 @@ void process_archive(const char *filename) {
     push_cleanup(cu_pathname,~0, 0,0, 1,(void*)reasmbuf);
     push_cleanup(cu_pathname,~0, 0,0, 1,(void*)reasmbuf);
     c1= m_fork();
     c1= m_fork();
     if (!c1) {
     if (!c1) {
-      execlp(SPLITTER, SPLITTER,"-Qao",reasmbuf,filename,(char*)0);
+      execlp(SPLITTER, SPLITTER, "-Qao", reasmbuf, filename, NULL);
       ohshite(_("failed to exec dpkg-split to see if it's part of a multiparter"));
       ohshite(_("failed to exec dpkg-split to see if it's part of a multiparter"));
     }
     }
     while ((r= waitpid(c1,&status,0)) == -1 && errno == EINTR);
     while ((r= waitpid(c1,&status,0)) == -1 && errno == EINTR);
@@ -184,7 +184,7 @@ void process_archive(const char *filename) {
   c1= m_fork();
   c1= m_fork();
   if (!c1) {
   if (!c1) {
     cidirrest[-1]= 0;
     cidirrest[-1]= 0;
-    execlp(BACKEND, BACKEND,"--control",filename,cidir,(char*)0);
+    execlp(BACKEND, BACKEND, "--control", filename, cidir, NULL);
     ohshite(_("failed to exec dpkg-deb to extract control information"));
     ohshite(_("failed to exec dpkg-deb to extract control information"));
   }
   }
   waitsubproc(c1,BACKEND " --control",0);
   waitsubproc(c1,BACKEND " --control",0);
@@ -426,13 +426,13 @@ void process_archive(const char *filename) {
                                   "removing", removing->name,
                                   "removing", removing->name,
                                   versiondescribe(&removing->installed.version,
                                   versiondescribe(&removing->installed.version,
                                                   vdew_nonambig),
                                                   vdew_nonambig),
-                                  (char*)0);
+                                  NULL);
     } else {
     } else {
       maintainer_script_installed(deconpil->pkg, PRERMFILE, "pre-removal",
       maintainer_script_installed(deconpil->pkg, PRERMFILE, "pre-removal",
                                   "deconfigure", "in-favour", pkg->name,
                                   "deconfigure", "in-favour", pkg->name,
                                   versiondescribe(&pkg->available.version,
                                   versiondescribe(&pkg->available.version,
                                                   vdew_nonambig),
                                                   vdew_nonambig),
-                                  (char*)0);
+                                  NULL);
     }
     }
   }
   }
 
 
@@ -447,7 +447,7 @@ void process_archive(const char *filename) {
                                 "remove", "in-favour", pkg->name,
                                 "remove", "in-favour", pkg->name,
                                 versiondescribe(&pkg->available.version,
                                 versiondescribe(&pkg->available.version,
                                                 vdew_nonambig),
                                                 vdew_nonambig),
-                                (char*)0);
+                                NULL);
     conflictor[i]->status= stat_halfinstalled;
     conflictor[i]->status= stat_halfinstalled;
     modstatdb_note(conflictor[i]);
     modstatdb_note(conflictor[i]);
   }
   }
@@ -461,21 +461,21 @@ void process_archive(const char *filename) {
     push_cleanup(cu_preinstverynew,~ehflag_normaltidy, 0,0,
     push_cleanup(cu_preinstverynew,~ehflag_normaltidy, 0,0,
                  3,(void*)pkg,(void*)cidir,(void*)cidirrest);
                  3,(void*)pkg,(void*)cidir,(void*)cidirrest);
     maintainer_script_new(pkg->name, PREINSTFILE, "pre-installation", cidir, cidirrest,
     maintainer_script_new(pkg->name, PREINSTFILE, "pre-installation", cidir, cidirrest,
-                          "install", (char*)0);
+                          "install", NULL);
   } else if (oldversionstatus == stat_configfiles) {
   } else if (oldversionstatus == stat_configfiles) {
     push_cleanup(cu_preinstnew,~ehflag_normaltidy, 0,0,
     push_cleanup(cu_preinstnew,~ehflag_normaltidy, 0,0,
                  3,(void*)pkg,(void*)cidir,(void*)cidirrest);
                  3,(void*)pkg,(void*)cidir,(void*)cidirrest);
     maintainer_script_new(pkg->name, PREINSTFILE, "pre-installation", cidir, cidirrest,
     maintainer_script_new(pkg->name, PREINSTFILE, "pre-installation", cidir, cidirrest,
                           "install", versiondescribe(&pkg->installed.version,
                           "install", versiondescribe(&pkg->installed.version,
                                                      vdew_nonambig),
                                                      vdew_nonambig),
-                          (char*)0);
+                          NULL);
   } else {
   } else {
     push_cleanup(cu_preinstupgrade,~ehflag_normaltidy, 0,0,
     push_cleanup(cu_preinstupgrade,~ehflag_normaltidy, 0,0,
                  4,(void*)pkg,(void*)cidir,(void*)cidirrest,(void*)&oldversionstatus);
                  4,(void*)pkg,(void*)cidir,(void*)cidirrest,(void*)&oldversionstatus);
     maintainer_script_new(pkg->name, PREINSTFILE, "pre-installation", cidir, cidirrest,
     maintainer_script_new(pkg->name, PREINSTFILE, "pre-installation", cidir, cidirrest,
                           "upgrade", versiondescribe(&pkg->installed.version,
                           "upgrade", versiondescribe(&pkg->installed.version,
                                                      vdew_nonambig),
                                                      vdew_nonambig),
-                          (char*)0);
+                          NULL);
     printf(_("Unpacking replacement %.250s ...\n"),pkg->name);
     printf(_("Unpacking replacement %.250s ...\n"),pkg->name);
   }
   }
   
   
@@ -556,7 +556,7 @@ void process_archive(const char *filename) {
   c1= m_fork();
   c1= m_fork();
   if (!c1) {
   if (!c1) {
     m_dup2(p1[1],1); close(p1[0]); close(p1[1]);
     m_dup2(p1[1],1); close(p1[0]); close(p1[1]);
-    execlp(BACKEND, BACKEND, "--fsys-tarfile", filename, (char*)0);
+    execlp(BACKEND, BACKEND, "--fsys-tarfile", filename, NULL);
     ohshite(_("unable to exec dpkg-deb to get filesystem archive"));
     ohshite(_("unable to exec dpkg-deb to get filesystem archive"));
   }
   }
   close(p1[1]);
   close(p1[1]);
@@ -981,7 +981,7 @@ void process_archive(const char *filename) {
                                 "disappear", pkg->name, 
                                 "disappear", pkg->name, 
                                 versiondescribe(&pkg->available.version,
                                 versiondescribe(&pkg->available.version,
                                                 vdew_nonambig),
                                                 vdew_nonambig),
-                                (char*)0);
+                                NULL);
 
 
     /* OK, now we delete all the stuff in the `info' directory .. */
     /* OK, now we delete all the stuff in the `info' directory .. */
     varbufreset(&fnvb);
     varbufreset(&fnvb);

+ 3 - 3
src/remove.c

@@ -170,7 +170,7 @@ void deferred_remove(struct pkginfo *pkg) {
       modstatdb_note(pkg);
       modstatdb_note(pkg);
       push_cleanup(cu_prermremove,~ehflag_normaltidy, 0,0, 1,(void*)pkg);
       push_cleanup(cu_prermremove,~ehflag_normaltidy, 0,0, 1,(void*)pkg);
       maintainer_script_installed(pkg, PRERMFILE, "pre-removal",
       maintainer_script_installed(pkg, PRERMFILE, "pre-removal",
-                                  "remove", (char*)0);
+                                  "remove", NULL);
     }
     }
 
 
     pkg->status= stat_unpacked; /* Will turn into halfinstalled soon ... */
     pkg->status= stat_unpacked; /* Will turn into halfinstalled soon ... */
@@ -283,7 +283,7 @@ static void removal_bulk_remove_files(
     }
     }
     write_filelist_except(pkg,leftover,0);
     write_filelist_except(pkg,leftover,0);
     maintainer_script_installed(pkg, POSTRMFILE, "post-removal",
     maintainer_script_installed(pkg, POSTRMFILE, "post-removal",
-                                "remove", (char*)0);
+                                "remove", NULL);
     varbufreset(&fnvb);
     varbufreset(&fnvb);
     varbufaddstr(&fnvb,admindir);
     varbufaddstr(&fnvb,admindir);
     varbufaddstr(&fnvb,"/" INFODIR);
     varbufaddstr(&fnvb,"/" INFODIR);
@@ -512,7 +512,7 @@ static void removal_bulk_remove_configfiles(struct pkginfo *pkg) {
     modstatdb_note(pkg);
     modstatdb_note(pkg);
         
         
     maintainer_script_installed(pkg, POSTRMFILE, "post-removal",
     maintainer_script_installed(pkg, POSTRMFILE, "post-removal",
-                                "purge", (char*)0);
+                                "purge", NULL);
 }
 }
 
 
 void removal_bulk(struct pkginfo *pkg) {
 void removal_bulk(struct pkginfo *pkg) {