Actions

EmSys

CCoding Style - Donot comment Bad code-rewrite it

From EdWiki

Don’t comment Bad code, rewrite it

Comment anything unusual or potentially confusing, but when the comment outweighs the code, the code probably needs fixing.

/* If “result” is non-zero so return false(zero) */
#ifdef DEBUG
    printf(*** isword returns !result = %d\n”, !result );
    fflush(stdout);
#endif
return (!result);

Re-write it

#ifdef DEBUG
    printf(*** isword returns matchfound = %d\n”, matchfound );
    fflush(stdout);
#endif
return matchfound;