473,396 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Redundant behavior in coding guideline

Some of the coding guideline are mandatory, and even the format or
layout of the text of the source code also should be followed. There's
plenty of codes like the following snippet.

Do you think the "re-evaluating the previous condition" is necessary
and should be avoided though it's one of your coding guideline? And
yes, there's plenty of code like this in many projects.

78 /* Error handling */
79 if ((NULL == p_SrcNm) || (NULL == p_DestNm))
80 {
81 lb_RetVal = false;
82
83 /* some other things special here ... */
84
85 if (NULL == p_SrcNm) /* Re-evaluating the previous
condition */
86 {
87 /* some other things special here ... */
88
89 ErrorEntryAdd(p_SrcNm);
90 ErrorHandle();
91 }
92
93 if (NULL == p_DestNm) /* Re-evaluating the previous
condition */
94 {
95 /* some other things special here ... */
96
97 ErrorEntryAdd(p_DestNm);
98 ErrorHandle();
99 }
100 }

Nov 15 '05 #1
0 934

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Ray Gardener | last post by:
I've always wondered what other C++ programmers fail to do while coding even though they know what they're doing is... naughty (and some of the items below occur in other languages, of course). ...
1
by: jarit | last post by:
Hi, Found these coding guidelines for C#, HTML, Javascript, Java, HTML, PL/SQL, T-SQL, VB and VBScript. Well written and free to download. www.demachina.com/products/swat Jeroen
99
by: Mikhail Teterin | last post by:
Hello! Consider the following simple accessor function: typedef struct { int i; char name; } MY_TYPE; const char *
2
by: lovecreatesbeauty | last post by:
Some of the coding guideline are mandatory, and even the format or layout of the text of the source code also should be followed. There's plenty of codes like the following snippet. Do you think...
40
by: Neo The One | last post by:
I think C# is forcing us to write more code by enforcing a rule that can be summarized as 'A local variable must be assgined *explicitly* before reading its value.' If you are interested in what...
6
by: Andrea Williams | last post by:
Responding to this link in an old thread: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/ht ml/cpconnetframeworkdesignguidelines.asp According to that naming...
4
by: Dotnetjunky | last post by:
Hi, So far, I've found tons of documents describing recommended coding standards for C#, but not a single piece on VB.NET yet. Anybody here knows such a coding standards guideline on VB.NET...
3
by: ct-86 | last post by:
http://www.cdbook.cn/book.asp?id=2393 Organizational and Policy Issues 1 0. Don't sweat the small stuff. (Or: Know what not to standardize.) 2 1. Compile cleanly at high warning levels. 4 2....
7
by: Robert Seacord | last post by:
The CERT/CC has just deployed a new web site dedicated to developing secure coding standards for the C programming language, C++, and eventually other programming language. We have already...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.