Date: Mon, 18 Feb 2019 19:16:15 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r344266 - stable/11/stand/libsa Message-ID: <201902181916.x1IJGFBj086093@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Mon Feb 18 19:16:14 2019 New Revision: 344266 URL: https://svnweb.freebsd.org/changeset/base/344266 Log: MFC r332170, r332173: light cd9660 cleanup r332170: libsa: cd9660: warning: 'lenskip' may be used uninitialized in this function We better provide value for lenskip in both instances. r332173: libsa: name is not used in dirmatch() Seems like variable 'name' is leftover. Modified: stable/11/stand/libsa/cd9660.c stable/11/stand/libsa/cd9660read.c Directory Properties: stable/11/ (props changed) Modified: stable/11/stand/libsa/cd9660.c ============================================================================== --- stable/11/stand/libsa/cd9660.c Mon Feb 18 19:13:28 2019 (r344265) +++ stable/11/stand/libsa/cd9660.c Mon Feb 18 19:16:14 2019 (r344266) @@ -309,6 +309,7 @@ cd9660_open(const char *path, struct open_file *f) first = 1; use_rrip = 0; + lenskip = 0; while (*path) { bno = isonum_733(rec.extent) + isonum_711(rec.ext_attr_length); dsize = isonum_733(rec.size); @@ -343,7 +344,7 @@ cd9660_open(const char *path, struct open_file *f) use_rrip = rrip_check(f, dp, &lenskip); if (dirmatch(f, path, dp, use_rrip, - first ? 0 : lenskip)) { + first ? 0 : lenskip)) { first = 0; break; } else Modified: stable/11/stand/libsa/cd9660read.c ============================================================================== --- stable/11/stand/libsa/cd9660read.c Mon Feb 18 19:13:28 2019 (r344265) +++ stable/11/stand/libsa/cd9660read.c Mon Feb 18 19:16:14 2019 (r344266) @@ -174,7 +174,7 @@ dirmatch(const char *path, struct iso_directory_record int lenskip) { size_t len; - const char *cp = NULL, *name = NULL; + const char *cp = NULL; int i, icase; if (use_rrip) @@ -187,7 +187,6 @@ dirmatch(const char *path, struct iso_directory_record icase = 1; } else icase = 0; - name = cp; for (i = len; --i >= 0; path++, cp++) { if (!*path || *path == '/') break; @@ -247,6 +246,7 @@ cd9660_lookup(const char *path) first = 1; use_rrip = 0; + lenskip = 0; while (*path) { bno = isonum_733(rec.extent) + isonum_711(rec.ext_attr_length); dsize = isonum_733(rec.size);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902181916.x1IJGFBj086093>