From: Matthew Fernandez Date: Thu, 18 Feb 2021 04:53:54 +0000 (-0800) Subject: unify some fopen code across Windows and non-Windows X-Git-Tag: 2.47.0~40^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65d0ace960b124784755fa64a5afd68d49b0ea61;p=graphviz unify some fopen code across Windows and non-Windows The mode flag 'b' is a no-op on POSIX, so we can use the same code everywhere. --- diff --git a/lib/gvc/gvusershape.c b/lib/gvc/gvusershape.c index 6bb1a3768..3fe3ebdc6 100644 --- a/lib/gvc/gvusershape.c +++ b/lib/gvc/gvusershape.c @@ -623,11 +623,7 @@ boolean gvusershape_file_access(usershape_t *us) agerr(AGWARN, "Filename \"%s\" is unsafe\n", us->name); return FALSE; } -#ifndef _WIN32 - us->f = fopen(fn, "r"); -#else us->f = fopen(fn, "rb"); -#endif if (us->f == NULL) { agerr(AGWARN, "%s while opening %s\n", strerror(errno), fn); return FALSE;