Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/mopd Kill redundant ()
details: https://anonhg.NetBSD.org/src/rev/c7f6c4257901
branches: trunk
changeset: 765343:c7f6c4257901
user: joerg <joerg%NetBSD.org@localhost>
date: Tue May 24 13:08:16 2011 +0000
description:
Kill redundant ()
diffstat:
usr.sbin/mopd/common/dl.c | 6 +++---
usr.sbin/mopd/common/print.c | 12 ++++++------
usr.sbin/mopd/common/put.c | 6 +++---
usr.sbin/mopd/common/rc.c | 14 +++++++-------
usr.sbin/mopd/mopd/process.c | 36 ++++++++++++++++++------------------
5 files changed, 37 insertions(+), 37 deletions(-)
diffs (272 lines):
diff -r a2d56ca0b8a3 -r c7f6c4257901 usr.sbin/mopd/common/dl.c
--- a/usr.sbin/mopd/common/dl.c Tue May 24 13:03:19 2011 +0000
+++ b/usr.sbin/mopd/common/dl.c Tue May 24 13:08:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dl.c,v 1.7 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: dl.c,v 1.8 2011/05/24 13:08:16 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: dl.c,v 1.7 2009/11/17 18:58:07 drochner Exp $");
+__RCSID("$NetBSD: dl.c,v 1.8 2011/05/24 13:08:16 joerg Exp $");
#endif
#include "os.h"
@@ -189,7 +189,7 @@
tmpc = mopGetChar(pkt,&idx); /* Error */
(void)fprintf(fd,"Error : %02x (",tmpc);
- if ((tmpc == 0)) {
+ if (tmpc == 0) {
(void)fprintf(fd,"no error)\n");
} else {
(void)fprintf(fd,"error)\n");
diff -r a2d56ca0b8a3 -r c7f6c4257901 usr.sbin/mopd/common/print.c
--- a/usr.sbin/mopd/common/print.c Tue May 24 13:03:19 2011 +0000
+++ b/usr.sbin/mopd/common/print.c Tue May 24 13:08:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: print.c,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: print.c,v 1.7 2011/05/24 13:08:16 joerg Exp $ */
/*
* Copyright (c) 1993-96 Mats O Jansson. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: print.c,v 1.6 2009/11/17 18:58:07 drochner Exp $");
+__RCSID("$NetBSD: print.c,v 1.7 2011/05/24 13:08:16 joerg Exp $");
#endif
#include <sys/types.h>
@@ -523,18 +523,18 @@
case MOP_K_INFO_SFID:
tmpc = mopGetChar(pkt,idx);
(void)fprintf(fd,"Software ID : %02x ",tmpc);
- if ((tmpc == 0)) {
+ if (tmpc == 0) {
(void)fprintf(fd,"No software id");
}
- if ((tmpc == 254)) {
+ if (tmpc == 254) {
(void)fprintf(fd,"Maintenance system");
tmpc = 0;
}
- if ((tmpc == 255)) {
+ if (tmpc == 255) {
(void)fprintf(fd,"Standard operating system");
tmpc = 0;
}
- if ((tmpc > 0)) {
+ if (tmpc > 0) {
(void)fprintf(fd,"'");
for (i = 0; i < ((int) tmpc); i++) {
(void)fprintf(fd,"%c",
diff -r a2d56ca0b8a3 -r c7f6c4257901 usr.sbin/mopd/common/put.c
--- a/usr.sbin/mopd/common/put.c Tue May 24 13:03:19 2011 +0000
+++ b/usr.sbin/mopd/common/put.c Tue May 24 13:08:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: put.c,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: put.c,v 1.7 2011/05/24 13:08:16 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: put.c,v 1.6 2009/11/17 18:58:07 drochner Exp $");
+__RCSID("$NetBSD: put.c,v 1.7 2011/05/24 13:08:16 joerg Exp $");
#endif
#include "os.h"
@@ -79,7 +79,7 @@
time_t tnow;
struct tm *timenow;
- if ((value == 0)) {
+ if (value == 0) {
tnow = time(NULL);
} else {
tnow = value;
diff -r a2d56ca0b8a3 -r c7f6c4257901 usr.sbin/mopd/common/rc.c
--- a/usr.sbin/mopd/common/rc.c Tue May 24 13:03:19 2011 +0000
+++ b/usr.sbin/mopd/common/rc.c Tue May 24 13:08:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rc.c,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: rc.c,v 1.7 2011/05/24 13:08:16 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: rc.c,v 1.6 2009/11/17 18:58:07 drochner Exp $");
+__RCSID("$NetBSD: rc.c,v 1.7 2011/05/24 13:08:16 joerg Exp $");
#endif
#include "os.h"
@@ -68,7 +68,7 @@
break;
case MOP_K_CODE_BOT:
- if ((moplen == 5)) {
+ if (moplen == 5) {
tmps = mopGetShort(pkt,&idx);
(void)fprintf(fd,"Verification : %04x\n",tmps);
} else {
@@ -111,18 +111,18 @@
tmpc = mopGetChar(pkt,&idx); /* Software ID */
(void)fprintf(fd,"Software ID : %02x ",tmpc);
- if ((tmpc == 0)) {
+ if (tmpc == 0) {
(void)fprintf(fd,"No software id");
}
- if ((tmpc == 254)) {
+ if (tmpc == 254) {
(void)fprintf(fd,"Maintenance system");
tmpc = 0;
}
- if ((tmpc == 255)) {
+ if (tmpc == 255) {
(void)fprintf(fd,"Standard operating system");
tmpc = 0;
}
- if ((tmpc > 0)) {
+ if (tmpc > 0) {
(void)fprintf(fd,"'");
for (i = 0; i < ((int) tmpc); i++) {
(void)fprintf(fd,"%c",
diff -r a2d56ca0b8a3 -r c7f6c4257901 usr.sbin/mopd/mopd/process.c
--- a/usr.sbin/mopd/mopd/process.c Tue May 24 13:03:19 2011 +0000
+++ b/usr.sbin/mopd/mopd/process.c Tue May 24 13:08:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: process.c,v 1.17 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: process.c,v 1.18 2011/05/24 13:08:17 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: process.c,v 1.17 2009/11/17 18:58:07 drochner Exp $");
+__RCSID("$NetBSD: process.c,v 1.18 2011/05/24 13:08:17 joerg Exp $");
#endif
#include "os.h"
@@ -182,16 +182,16 @@
mopPutLength(pkt, trans, idx);
newlen = mopGetLength(pkt, trans);
- if ((DebugFlag == DEBUG_ONELINE)) {
+ if (DebugFlag == DEBUG_ONELINE) {
mopPrintOneline(stdout, pkt, trans);
}
- if ((DebugFlag >= DEBUG_HEADER)) {
+ if (DebugFlag >= DEBUG_HEADER) {
mopPrintHeader(stdout, pkt, trans);
mopPrintMopHeader(stdout, pkt, trans);
}
- if ((DebugFlag >= DEBUG_INFO)) {
+ if (DebugFlag >= DEBUG_INFO) {
mopDumpDL(stdout, pkt, trans);
}
@@ -287,16 +287,16 @@
mopPutLength(pkt, trans, idx);
newlen = mopGetLength(pkt, trans);
- if ((DebugFlag == DEBUG_ONELINE)) {
+ if (DebugFlag == DEBUG_ONELINE) {
mopPrintOneline(stdout, pkt, trans);
}
- if ((DebugFlag >= DEBUG_HEADER)) {
+ if (DebugFlag >= DEBUG_HEADER) {
mopPrintHeader(stdout, pkt, trans);
mopPrintMopHeader(stdout, pkt, trans);
}
- if ((DebugFlag >= DEBUG_INFO)) {
+ if (DebugFlag >= DEBUG_INFO) {
mopDumpDL(stdout, pkt, trans);
}
@@ -337,7 +337,7 @@
dle = &dllist[slot];
- if ((new_count == ((dle->count+1) % 256))) {
+ if (new_count == ((dle->count+1) % 256)) {
dle->loadaddr = dllist[slot].nloadaddr;
dle->count = new_count;
} else if (new_count != (dle->count % 256)) {
@@ -406,16 +406,16 @@
}
}
- if ((DebugFlag == DEBUG_ONELINE)) {
+ if (DebugFlag == DEBUG_ONELINE) {
mopPrintOneline(stdout, pkt, trans);
}
- if ((DebugFlag >= DEBUG_HEADER)) {
+ if (DebugFlag >= DEBUG_HEADER) {
mopPrintHeader(stdout, pkt, trans);
mopPrintMopHeader(stdout, pkt, trans);
}
- if ((DebugFlag >= DEBUG_INFO)) {
+ if (DebugFlag >= DEBUG_INFO) {
mopDumpDL(stdout, pkt, trans);
}
@@ -439,16 +439,16 @@
struct dllist dl,*dl_rpr;
u_char rpr_pgty,load;
- if ((DebugFlag == DEBUG_ONELINE)) {
+ if (DebugFlag == DEBUG_ONELINE) {
mopPrintOneline(stdout, pkt, trans);
}
- if ((DebugFlag >= DEBUG_HEADER)) {
+ if (DebugFlag >= DEBUG_HEADER) {
mopPrintHeader(stdout, pkt, trans);
mopPrintMopHeader(stdout, pkt, trans);
}
- if ((DebugFlag >= DEBUG_INFO)) {
+ if (DebugFlag >= DEBUG_INFO) {
mopDumpDL(stdout, pkt, trans);
}
@@ -573,16 +573,16 @@
u_char mopcode;
struct dllist dl,*dl_rpr;
- if ((DebugFlag == DEBUG_ONELINE)) {
+ if (DebugFlag == DEBUG_ONELINE) {
mopPrintOneline(stdout, pkt, trans);
}
- if ((DebugFlag >= DEBUG_HEADER)) {
+ if (DebugFlag >= DEBUG_HEADER) {
mopPrintHeader(stdout, pkt, trans);
mopPrintMopHeader(stdout, pkt, trans);
}
- if ((DebugFlag >= DEBUG_INFO)) {
+ if (DebugFlag >= DEBUG_INFO) {
mopDumpRC(stdout, pkt, trans);
}
Home |
Main Index |
Thread Index |
Old Index