]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
libsubid: use log_set_progname in subid_init
authorAdam Sampson <ats@offog.org>
Sun, 26 Dec 2021 18:16:10 +0000 (18:16 +0000)
committerAdam Sampson <ats@offog.org>
Mon, 27 Dec 2021 16:28:23 +0000 (16:28 +0000)
The static Prog variable here is no longer used, so remove it.

libsubid/api.c

index 7a0ebaa5db4e10b0b824b5b260b5ceabf64df31c..4479163c2435cc56e34dbff2b3487154b8f63e8c 100644 (file)
 #include "subid.h"
 #include "shadowlog.h"
 
-static const char *Prog = "(libsubid)";
-
 bool subid_init(const char *progname, FILE * logfd)
 {
        FILE *shadow_logfd;
        if (progname) {
                progname = strdup(progname);
-               if (progname)
-                       Prog = progname;
-               else
+               if (!progname)
                        return false;
+               log_set_progname(progname);
+       } else {
+               log_set_progname("(libsubid)");
        }
 
        if (logfd) {