Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 lint: remove redundant parentheses aroun...
details: https://anonhg.NetBSD.org/src/rev/0ccdab8e0f62
branches: trunk
changeset: 958560:0ccdab8e0f62
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Jan 10 14:12:48 2021 +0000
description:
lint: remove redundant parentheses around return value
diffstat:
usr.bin/xlint/lint1/decl.c | 18 +++++++++---------
usr.bin/xlint/lint1/main1.c | 6 +++---
2 files changed, 12 insertions(+), 12 deletions(-)
diffs (87 lines):
diff -r 305dafd81a8a -r 0ccdab8e0f62 usr.bin/xlint/lint1/decl.c
--- a/usr.bin/xlint/lint1/decl.c Sun Jan 10 14:09:57 2021 +0000
+++ b/usr.bin/xlint/lint1/decl.c Sun Jan 10 14:12:48 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.117 2021/01/10 14:09:57 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.118 2021/01/10 14:12:48 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: decl.c,v 1.117 2021/01/10 14:09:57 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.118 2021/01/10 14:12:48 rillig Exp $");
#endif
#include <sys/param.h>
@@ -2029,20 +2029,20 @@
/* redefinition of %s */
error(28, dsym->s_name);
print_previous_declaration(-1, rsym);
- return(1);
+ return 1;
}
if (!eqtype(rsym->s_type, dsym->s_type, 0, 0, dowarn)) {
/* redeclaration of %s */
error(27, dsym->s_name);
print_previous_declaration(-1, rsym);
- return(1);
+ return 1;
}
if (rsym->s_scl == EXTERN && dsym->s_scl == EXTERN)
- return(0);
+ return 0;
if (rsym->s_scl == STATIC && dsym->s_scl == STATIC)
- return(0);
+ return 0;
if (rsym->s_scl == STATIC && dsym->s_def == DECL)
- return(0);
+ return 0;
if (rsym->s_scl == EXTERN && rsym->s_def == DEF) {
/*
* All cases except "int a = 1; static int a;" are caught
@@ -2051,13 +2051,13 @@
/* redeclaration of %s */
error(27, dsym->s_name);
print_previous_declaration(-1, rsym);
- return(1);
+ return 1;
}
if (rsym->s_scl == EXTERN) {
/* previously declared extern, becomes static: %s */
warning(29, dsym->s_name);
print_previous_declaration(-1, rsym);
- return(0);
+ return 0;
}
/*
* Now it's one of:
diff -r 305dafd81a8a -r 0ccdab8e0f62 usr.bin/xlint/lint1/main1.c
--- a/usr.bin/xlint/lint1/main1.c Sun Jan 10 14:09:57 2021 +0000
+++ b/usr.bin/xlint/lint1/main1.c Sun Jan 10 14:12:48 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main1.c,v 1.32 2021/01/04 22:26:50 rillig Exp $ */
+/* $NetBSD: main1.c,v 1.33 2021/01/10 14:12:48 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: main1.c,v 1.32 2021/01/04 22:26:50 rillig Exp $");
+__RCSID("$NetBSD: main1.c,v 1.33 2021/01/10 14:12:48 rillig Exp $");
#endif
#include <sys/types.h>
@@ -200,7 +200,7 @@
case 'm':
msglist();
- return(0);
+ return 0;
case 'R':
fnaddreplsrcdir(optarg);
Home |
Main Index |
Thread Index |
Old Index