Kill redundant ()

This commit is contained in:
joerg 2011-05-24 13:08:16 +00:00
parent e4a1756060
commit 77a6772536
5 changed files with 37 additions and 37 deletions

View File

@ -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 @@ mopDumpDL(FILE *fd, const u_char *pkt, int trans)
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");

View File

@ -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 @@ mopPrintInfo(FILE *fd, const u_char *pkt, int *idx,
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",

View File

@ -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 @@ mopPutTime(u_char *pkt, int *idx, time_t value)
time_t tnow;
struct tm *timenow;
if ((value == 0)) {
if (value == 0) {
tnow = time(NULL);
} else {
tnow = value;

View File

@ -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 @@ mopDumpRC(FILE *fd, const u_char *pkt, int trans)
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 @@ mopDumpRC(FILE *fd, const u_char *pkt, int trans)
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",

View File

@ -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 @@ mopSendASV(const u_char *dst, const u_char *src, struct if_info *ii, int trans)
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 @@ mopStartLoad(const u_char *dst, const u_char *src, struct dllist *dl_rpr,
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 @@ mopNextLoad(const u_char *dst, const u_char *src, u_char new_count, int trans)
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 @@ mopNextLoad(const u_char *dst, const u_char *src, u_char new_count, int 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);
}
@ -439,16 +439,16 @@ mopProcessDL(FILE *fd, struct if_info *ii, const u_char *pkt, int *idx,
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 @@ mopProcessRC(FILE *fd, struct if_info *ii, const u_char *pkt, int *idx,
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);
}