]> granicus.if.org Git - sudo/commitdiff
Fix uninitialized variables warnings in error case when src file
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 23 Jun 2015 18:57:47 +0000 (12:57 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 23 Jun 2015 18:57:47 +0000 (12:57 -0600)
cannot be opened.  At least one of these is a false positive.

src/sesh.c

index 7069a1fc8b2e55f28a768a9f390b643e9e22abaa..c76609332df92135275849f282bdef67cd8c9640 100644 (file)
@@ -118,7 +118,8 @@ main(int argc, char *argv[], char *envp[])
 static int
 sesh_sudoedit(int argc, char *argv[])
 {
-    int fd_src, fd_dst, i, oflags_dst, post, ret = SESH_ERR_FAILURE;
+    int i, oflags_dst, post, ret = SESH_ERR_FAILURE;
+    int fd_src = -1, fd_dst = -1;
     ssize_t nread, nwritten;
     struct stat sb;
     struct timespec times[2];