[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tiny initialization refactoring in diff.c
From: |
Alexey Mahotkin |
Subject: |
[PATCH] tiny initialization refactoring in diff.c |
Date: |
Sat, 10 May 2003 22:06:42 +0400 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.4 (Common Lisp, i386-debian-linux) |
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 <alexm@hsys.msk.ru>
+ * 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
- [PATCH] tiny initialization refactoring in diff.c,
Alexey Mahotkin <=