comparison mercurial/bdiff.c @ 970:bf375e93073b

Fix possible unitialized variable warnings
author mpm@selenic.com
date Sat, 20 Aug 2005 01:29:04 -0700
parents 01215ad04283
children 4f81068ed8cd
comparison
equal deleted inserted replaced
969:1d5b97537561 970:bf375e93073b
251 251
252 static PyObject *blocks(PyObject *self, PyObject *args) 252 static PyObject *blocks(PyObject *self, PyObject *args)
253 { 253 {
254 PyObject *sa, *sb, *rl = NULL, *m; 254 PyObject *sa, *sb, *rl = NULL, *m;
255 struct line *a, *b; 255 struct line *a, *b;
256 struct hunklist l; 256 struct hunklist l = {NULL, NULL};
257 struct hunk *h; 257 struct hunk *h;
258 int an, bn, pos = 0; 258 int an, bn, pos = 0;
259 259
260 if (!PyArg_ParseTuple(args, "SS:bdiff", &sa, &sb)) 260 if (!PyArg_ParseTuple(args, "SS:bdiff", &sa, &sb))
261 return NULL; 261 return NULL;
285 285
286 static PyObject *bdiff(PyObject *self, PyObject *args) 286 static PyObject *bdiff(PyObject *self, PyObject *args)
287 { 287 {
288 PyObject *sa, *sb, *result = NULL; 288 PyObject *sa, *sb, *result = NULL;
289 struct line *al, *bl; 289 struct line *al, *bl;
290 struct hunklist l; 290 struct hunklist l = {NULL, NULL};
291 struct hunk *h; 291 struct hunk *h;
292 char encode[12], *rb; 292 char encode[12], *rb;
293 int an, bn, len = 0, la = 0, lb = 0; 293 int an, bn, len = 0, la = 0, lb = 0;
294 294
295 if (!PyArg_ParseTuple(args, "SS:bdiff", &sa, &sb)) 295 if (!PyArg_ParseTuple(args, "SS:bdiff", &sa, &sb))