unix: Convert from AVERROR to errno range before comparing error codes
authorMartin Storsjö <martin@martin.st>
Mon, 5 Aug 2013 16:39:08 +0000 (19:39 +0300)
committerMartin Storsjö <martin@martin.st>
Tue, 6 Aug 2013 07:38:14 +0000 (10:38 +0300)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/unix.c

index 09f3d68..95552a9 100644 (file)
@@ -93,7 +93,7 @@ static int unix_open(URLContext *h, const char *filename, int flags)
     return 0;
 
 fail:
-    if (s->listen && ret != EADDRINUSE)
+    if (s->listen && AVUNERROR(ret) != EADDRINUSE)
         unlink(s->addr.sun_path);
     if (fd >= 0)
         closesocket(fd);