[Pkg-shadow-commits] r3131 - in upstream/trunk: . lib

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Thu Mar 18 00:03:51 UTC 2010


Author: nekral-guest
Date: 2010-03-18 00:03:48 +0000 (Thu, 18 Mar 2010)
New Revision: 3131

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/lib/tcbfuncs.c
Log:
	* lib/tcbfuncs.c: Avoid implicit signed to unsigned conversions.

Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2010-03-18 00:03:29 UTC (rev 3130)
+++ upstream/trunk/ChangeLog	2010-03-18 00:03:48 UTC (rev 3131)
@@ -14,6 +14,7 @@
 	* lib/tcbfuncs.c: Include shadowio.h, needed for the
 	spw_setdbname's prototype.
 	* lib/tcbfuncs.c: Ignore fflush() return value.
+	* lib/tcbfuncs.c: Avoid implicit signed to unsigned conversions.
 
 2010-03-17  Nicolas François  <nicolas.francois at centraliens.net>
 

Modified: upstream/trunk/lib/tcbfuncs.c
===================================================================
--- upstream/trunk/lib/tcbfuncs.c	2010-03-18 00:03:29 UTC (rev 3130)
+++ upstream/trunk/lib/tcbfuncs.c	2010-03-18 00:03:48 UTC (rev 3131)
@@ -101,7 +101,7 @@
 	char *path, *rval;
 	struct stat st;
 	char link[8192];
-	int ret;
+	ssize_t ret;
 
 	if (asprintf(&path, TCB_DIR "/%s", name) == -1) {
 		OUT_OF_MEMORY;
@@ -133,12 +133,12 @@
 		return NULL;
 	}
 	free(path);
-	if (ret >= sizeof(link) - 1) {
+	if ((size_t)ret >= sizeof(link) - 1) {
 		link[sizeof(link) - 1] = '\0';
 		fprintf(stderr, _("%s: Suspiciously long symlink: %s\n"), Prog, link);
 		return NULL;
 	}
-	link[ret] = '\0';
+	link[(size_t)ret] = '\0';
 	rval = strdup(link);
 	if (NULL == rval) {
 		OUT_OF_MEMORY;




More information about the Pkg-shadow-commits mailing list