gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 57/63: tool_parsecfg: Use correct return type for G


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 57/63: tool_parsecfg: Use correct return type for GetModuleFileName()
Date: Fri, 07 Jun 2019 18:37:19 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 3538026f6f145b2811f4d515992565d6cbe969b0
Author: Steve Holme <address@hidden>
AuthorDate: Sun Jun 2 22:21:31 2019 +0100

    tool_parsecfg: Use correct return type for GetModuleFileName()
    
    GetModuleFileName() returns a DWORD which is a typedef of an unsigned
    long and not an int.
    
    Closes #3980
---
 src/tool_parsecfg.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
index 621369d45..36c7bccf0 100644
--- a/src/tool_parsecfg.c
+++ b/src/tool_parsecfg.c
@@ -76,8 +76,9 @@ int parseconfig(const char *filename, struct GlobalConfig 
*global)
            * already declared via inclusions done in setup header file.
            * We assume that we are using the ASCII version here.
            */
-          int n = GetModuleFileNameA(0, filebuffer, sizeof(filebuffer));
-          if(n > 0 && n < (int)sizeof(filebuffer)) {
+          unsigned long len = GetModuleFileNameA(0, filebuffer,
+                                                 sizeof(filebuffer));
+          if(len > 0 && len < sizeof(filebuffer)) {
             /* We got a valid filename - get the directory part */
             char *lastdirchar = strrchr(filebuffer, '\\');
             if(lastdirchar) {

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]