Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/makemandb Simplify



details:   https://anonhg.NetBSD.org/src/rev/656bbf94dbba
branches:  trunk
changeset: 823647:656bbf94dbba
user:      abhinav <abhinav%NetBSD.org@localhost>
date:      Sun Apr 30 16:56:30 2017 +0000

description:
Simplify

diffstat:

 usr.sbin/makemandb/apropos-utils.c |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (31 lines):

diff -r 80536540b308 -r 656bbf94dbba usr.sbin/makemandb/apropos-utils.c
--- a/usr.sbin/makemandb/apropos-utils.c        Sun Apr 30 16:46:09 2017 +0000
+++ b/usr.sbin/makemandb/apropos-utils.c        Sun Apr 30 16:56:30 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: apropos-utils.c,v 1.35 2017/04/30 15:27:24 abhinav Exp $       */
+/*     $NetBSD: apropos-utils.c,v 1.36 2017/04/30 16:56:30 abhinav Exp $       */
 /*-
  * Copyright (c) 2011 Abhinav Upadhyay <er.abhinav.upadhyay%gmail.com@localhost>
  * All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: apropos-utils.c,v 1.35 2017/04/30 15:27:24 abhinav Exp $");
+__RCSID("$NetBSD: apropos-utils.c,v 1.36 2017/04/30 16:56:30 abhinav Exp $");
 
 #include <sys/queue.h>
 #include <sys/stat.h>
@@ -89,10 +89,8 @@
        assert(str);
        int i = 0;
        char c;
-       while (str[i] != '\0') {
-               c = tolower((unsigned char) str[i]);
-               str[i++] = c;
-       }
+       while ((c = str[i]) != '\0')
+               str[i++] = tolower((unsigned char) c);
        return str;
 }
 



Home | Main Index | Thread Index | Old Index