Skip to contentSkip to conversation

cr: fd can be used uninitialized

PATCH New Serge E. Hallyn 1 participant 1 message Mar 24, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cr: fd can be used uninitialized

Trivial fix.

---
 checkpoint/rstr_file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
checkpoint/rstr_file.c +1 -1
index de260dc..c9d75e5 100644
@@ -236,7 +236,7 @@ int cr_read_file(struct cr_ctx *ctx, int objref)
 {
 	struct cr_hdr_file *hh;
 	struct file *file;
-	int fd, ret;
+	int fd = -EINVAL, ret;
 
 	hh = cr_hbuf_get(ctx, sizeof(*hh));
 	if (!hh)
Signature · 1 line
1.6.1