File: 0002-errno.patch

package info (click to toggle)
vorbisgain 0.37-2
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 1,324 kB
  • ctags: 599
  • sloc: ansic: 3,315; sh: 3,033; makefile: 35
file content (33 lines) | stat: -rw-r--r-- 717 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Description: Zero errno before readdir call.
From: http://bugs.debian.org/375110
Forwarded: no
---
 recurse.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/recurse.c
+++ b/recurse.c
@@ -408,6 +408,7 @@
  */
 static int read_dir(DIRECTORY *directory)
 {
+    errno = 0;
     directory->entry = readdir(directory->dir);
 
     if (directory->entry != NULL)
@@ -622,6 +623,7 @@
     /* Check for wildcards */
     settings->pattern = last_path(my_path);
 
+#if 0 /* Disable for Debian, as it suprises people. --liw */
     if (contains_pattern(settings->pattern))
     {
         /* Strip last part of path */
@@ -637,6 +639,7 @@
         }
     }
     else
+#endif
     {
         settings->pattern = NULL;
     }