|
9 | 9 |
|
10 | 10 | static char git_default_date[50]; |
11 | 11 |
|
12 | | -static void copy_gecos(const struct passwd *w, char *name, int sz) |
| 12 | +static void copy_gecos(const struct passwd *w, char *name, size_t sz) |
13 | 13 | { |
14 | 14 | char *src, *dst; |
15 | | - int len, nlen; |
| 15 | + size_t len, nlen; |
16 | 16 |
|
17 | 17 | nlen = strlen(w->pw_name); |
18 | 18 |
|
@@ -49,7 +49,7 @@ static void copy_email(const struct passwd *pw) |
49 | 49 | * Make up a fake email address |
50 | 50 | * (name + '@' + hostname [+ '.' + domainname]) |
51 | 51 | */ |
52 | | - int len = strlen(pw->pw_name); |
| 52 | + size_t len = strlen(pw->pw_name); |
53 | 53 | if (len > sizeof(git_default_email)/2) |
54 | 54 | die("Your sysadmin must hate you!"); |
55 | 55 | memcpy(git_default_email, pw->pw_name, len); |
@@ -95,9 +95,9 @@ static void setup_ident(void) |
95 | 95 | datestamp(git_default_date, sizeof(git_default_date)); |
96 | 96 | } |
97 | 97 |
|
98 | | -static int add_raw(char *buf, int size, int offset, const char *str) |
| 98 | +static int add_raw(char *buf, size_t size, int offset, const char *str) |
99 | 99 | { |
100 | | - int len = strlen(str); |
| 100 | + size_t len = strlen(str); |
101 | 101 | if (offset + len > size) |
102 | 102 | return size; |
103 | 103 | memcpy(buf + offset, str, len); |
@@ -131,9 +131,9 @@ static int crud(unsigned char c) |
131 | 131 | * Copy over a string to the destination, but avoid special |
132 | 132 | * characters ('\n', '<' and '>') and remove crud at the end |
133 | 133 | */ |
134 | | -static int copy(char *buf, int size, int offset, const char *src) |
| 134 | +static int copy(char *buf, size_t size, int offset, const char *src) |
135 | 135 | { |
136 | | - int i, len; |
| 136 | + size_t i, len; |
137 | 137 | unsigned char c; |
138 | 138 |
|
139 | 139 | /* Remove crud from the beginning.. */ |
|
0 commit comments