[PATCH] tiny initialization refactoring in diff.c
Alexey Mahotkin <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.bugs |
|---|---|
| Message-ID | <[email protected]> |
I do not think that NULL-initializing deserves two lines of comments.
src/ChangeLog | 2 ++
src/diff.c | 9 ++-------
2 files changed, 4 insertions(+), 7 deletions(-)
--- ccvs/src/diff.c~diff.c-fix Sat May 10 21:59:58 2003
+++ ccvs-alexm/src/diff.c Sat May 10 21:59:58 2003
@@ -449,16 +449,11 @@ diff_fileproc (callerdat, finfo)
int status, err = 2; /* 2 == trouble, like rcsdiff */
Vers_TS *vers;
enum diff_file empty_file = DIFF_DIFFERENT;
- char *tmp;
+ char *tmp = NULL;
char *tocvsPath;
- char *fname;
+ char *fname = NULL;
char *label1;
char *label2;
-
- /* Initialize these solely to avoid warnings from gcc -Wall about
- variables that might be used uninitialized. */
- tmp = NULL;
- fname = NULL;
user_file_rev = 0;
vers = Version_TS (finfo, NULL, NULL, NULL, 1, 0);
--- ccvs/src/ChangeLog~diff.c-fix Sat May 10 21:59:58 2003
+++ ccvs-alexm/src/ChangeLog Sat May 10 22:05:45 2003
@@ -1,5 +1,7 @@
2003-05-10 Alexey Mahotkin <[email protected]>
+ * diff.c (diff_fileproc): Tiny initialization refactoring.
+
* gssapi-client.h: Move contents of lib/xgssapi.h here.
* server.c: xgssapi.h is no more.
_
--alexm