diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2017-05-30 17:51:06 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2017-05-30 17:51:06 +0200 |
commit | 279019043fd424eda265c5cefaa26a3f558b43d7 (patch) | |
tree | f9d4c8206a13ad003c856e5eb6d80f7d4b430c4e | |
parent | 50a68a565252b47ce241651b33a2d35f1898ebf4 (diff) | |
download | psutil-279019043fd424eda265c5cefaa26a3f558b43d7.tar.gz |
fix C compiler warning
-rw-r--r-- | psutil/arch/windows/inet_ntop.h | 11 | ||||
-rw-r--r-- | psutil/arch/windows/process_info.c | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/psutil/arch/windows/inet_ntop.h b/psutil/arch/windows/inet_ntop.h index 0d97e28c..70573a36 100644 --- a/psutil/arch/windows/inet_ntop.h +++ b/psutil/arch/windows/inet_ntop.h @@ -1,10 +1,15 @@ +/* + * Copyright (c) 2009, Giampaolo Rodola', Jeff Tang. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + #include <ws2tcpip.h> -PCSTR -WSAAPI +PCSTR WSAAPI inet_ntop( __in INT Family, __in PVOID pAddr, __out_ecount(StringBufSize) PSTR pStringBuf, __in size_t StringBufSize -);
\ No newline at end of file +); diff --git a/psutil/arch/windows/process_info.c b/psutil/arch/windows/process_info.c index cc566952..a9687f9c 100644 --- a/psutil/arch/windows/process_info.c +++ b/psutil/arch/windows/process_info.c @@ -259,7 +259,7 @@ psutil_check_phandle(HANDLE hProcess, DWORD pid) { return NoSuchProcess(); else if (ret == -1) return PyErr_SetFromWindowsErr(0); - else if (ret == -2) + else // -2 return NULL; } |