INN commit: branches/2.5 (nnrpd/python.c storage/cnfs/cnfs.c)
INN Commit
rra at isc.org
Sat Aug 6 20:43:03 UTC 2011
Date: Saturday, August 6, 2011 @ 13:43:03
Author: iulius
Revision: 9320
fix unsigned/signed conversions
Modified:
branches/2.5/nnrpd/python.c
branches/2.5/storage/cnfs/cnfs.c
---------------------+
nnrpd/python.c | 10 ++++++----
storage/cnfs/cnfs.c | 2 +-
2 files changed, 7 insertions(+), 5 deletions(-)
Modified: nnrpd/python.c
===================================================================
--- nnrpd/python.c 2011-08-06 20:42:06 UTC (rev 9319)
+++ nnrpd/python.c 2011-08-06 20:43:03 UTC (rev 9320)
@@ -26,7 +26,7 @@
/* Python redefines _POSIX_C_SOURCE, so undef it to suppress warnings. */
#undef _POSIX_C_SOURCE
-/* Make "s#" use Py_ssize_t rather than int. */
+/* Make "s#" use Py_ssize_t rather than signed size_t. */
#define PY_SSIZE_T_CLEAN
/* Python.h must be included after having defined PY_SSIZE_T_CLEAN,
@@ -37,7 +37,7 @@
/* Define Py_ssize_t when it does not exist (Python < 2.5.0). */
#if PY_VERSION_HEX < 0x02050000
- typedef int Py_ssize_t;
+ typedef ssize_t Py_ssize_t;
#endif
#include "clibrary.h"
@@ -331,12 +331,14 @@
while(PyDict_Next(result, &pos, &key, &value)) {
if (!PyString_Check(key)) {
- syslog(L_ERROR, "python access method return dictionary key %d not a string", pos);
+ syslog(L_ERROR, "python access method return dictionary key %ld not a string",
+ (long int) pos);
Reply("%d Internal error (2). Goodbye!\r\n", NNTP_FAIL_TERMINATING);
ExitWithStats(1, false);
}
if (!PyString_Check(value)) {
- syslog(L_ERROR, "python access method return dictionary value %d not a string", pos);
+ syslog(L_ERROR, "python access method return dictionary value %ld not a string",
+ (long int) pos);
Reply("%d Internal error (2). Goodbye!\r\n", NNTP_FAIL_TERMINATING);
ExitWithStats(1, false);
}
Modified: storage/cnfs/cnfs.c
===================================================================
--- storage/cnfs/cnfs.c 2011-08-06 20:42:06 UTC (rev 9319)
+++ storage/cnfs/cnfs.c 2011-08-06 20:43:03 UTC (rev 9320)
@@ -1741,7 +1741,7 @@
}
}
if (innconf->cnfscheckfudgesize != 0 && innconf->maxartsize != 0 &&
- (ntohl(cah.size) > innconf->maxartsize + innconf->cnfscheckfudgesize)) {
+ ((unsigned int) ntohl(cah.size) > innconf->maxartsize + innconf->cnfscheckfudgesize)) {
art->data = NULL;
art->len = 0;
art->token = NULL;
More information about the inn-committers
mailing list