The following commit has been merged in the master branch:
commit 1afae1b4508d506450c0bd2d82325e31c41af6ed
Author: Guillem Jover <[email protected]>
Date: Mon Sep 28 20:02:59 2009 +0200
dpkg: Use size_t instead of long for path_len in checkpath()
diff --git a/src/help.c b/src/help.c
index 7dc9288..67cb844 100644
--- a/src/help.c
+++ b/src/help.c
@@ -99,7 +99,7 @@ void checkpath(void) {
const char *path_list, *path, *path_end;
char *filename;
int warned= 0;
- long path_len;
+ size_t path_len;
path_list = getenv("PATH");
if (!path_list)
@@ -110,7 +110,7 @@ void checkpath(void) {
path = path_list;
while (path) {
path_end = strchr(path, ':');
- path_len = path_end ? path_end - path : (long)strlen(path);
+ path_len = path_end ? (size_t)(path_end - path) : strlen(path);
memcpy(filename, path, path_len);
if (path_len)
filename[path_len++] = '/';
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]