Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/makemandb Get rid of unnecessary variable.



details:   https://anonhg.NetBSD.org/src/rev/628498850d88
branches:  trunk
changeset: 823830:628498850d88
user:      abhinav <abhinav%NetBSD.org@localhost>
date:      Wed May 10 12:09:52 2017 +0000

description:
Get rid of unnecessary variable.

diffstat:

 usr.sbin/makemandb/makemandb.c |  12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diffs (40 lines):

diff -r 3c5f7b885951 -r 628498850d88 usr.sbin/makemandb/makemandb.c
--- a/usr.sbin/makemandb/makemandb.c    Wed May 10 11:27:14 2017 +0000
+++ b/usr.sbin/makemandb/makemandb.c    Wed May 10 12:09:52 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: makemandb.c,v 1.54 2017/05/02 13:54:08 abhinav Exp $   */
+/*     $NetBSD: makemandb.c,v 1.55 2017/05/10 12:09:52 abhinav Exp $   */
 /*
  * Copyright (c) 2011 Abhinav Upadhyay <er.abhinav.upadhyay%gmail.com@localhost>
  * Copyright (c) 2011 Kristaps Dzonsons <kristaps%bsd.lv@localhost>
@@ -17,7 +17,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: makemandb.c,v 1.54 2017/05/02 13:54:08 abhinav Exp $");
+__RCSID("$NetBSD: makemandb.c,v 1.55 2017/05/10 12:09:52 abhinav Exp $");
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -944,8 +944,7 @@
 {
        if (!rm)
                return;
-       const struct roff_meta *rm_meta = &rm->meta;
-       const char *s = rm_meta->msec == NULL ? "?" : rm_meta->msec;
+       const char *s = rm->meta.msec == NULL ? "?" : rm->meta.msec;
        easprintf(&rec->section, "%s", s);
        if (rec->section[0] == '?' && mflags.verbosity == 2)
                warnx("%s: Missing section number", rec->file_path);
@@ -960,9 +959,8 @@
 {
        if (rm == NULL)
                return;
-       const struct roff_meta *rm_meta = &rm->meta;
-       if (rm_meta->arch)
-               rec->machine = estrdup(rm_meta->arch);
+       if (rm->meta.arch)
+               rec->machine = estrdup(rm->meta.arch);
 }
 
 /*



Home | Main Index | Thread Index | Old Index