summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0b952a9)
raw | patch | inline | side by side (parent: 0b952a9)
author | Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> | |
Sun, 15 Apr 2007 18:51:29 +0000 (15:51 -0300) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 15 Apr 2007 22:59:09 +0000 (15:59 -0700) |
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
ident.c | patch | blob | history |
index b557ecd5397833ad14816e9fe61aa0880446303f..88e7f74e888f1c7b13182bf07afee01408e8e525 100644 (file)
--- a/ident.c
+++ b/ident.c
static char git_default_date[50];
-static void copy_gecos(const struct passwd *w, char *name, int sz)
+static void copy_gecos(const struct passwd *w, char *name, size_t sz)
{
char *src, *dst;
- int len, nlen;
+ size_t len, nlen;
nlen = strlen(w->pw_name);
* Make up a fake email address
* (name + '@' + hostname [+ '.' + domainname])
*/
- int len = strlen(pw->pw_name);
+ size_t len = strlen(pw->pw_name);
if (len > sizeof(git_default_email)/2)
die("Your sysadmin must hate you!");
memcpy(git_default_email, pw->pw_name, len);
datestamp(git_default_date, sizeof(git_default_date));
}
-static int add_raw(char *buf, int size, int offset, const char *str)
+static int add_raw(char *buf, size_t size, int offset, const char *str)
{
- int len = strlen(str);
+ size_t len = strlen(str);
if (offset + len > size)
return size;
memcpy(buf + offset, str, len);
* Copy over a string to the destination, but avoid special
* characters ('\n', '<' and '>') and remove crud at the end
*/
-static int copy(char *buf, int size, int offset, const char *src)
+static int copy(char *buf, size_t size, int offset, const char *src)
{
- int i, len;
+ size_t i, len;
unsigned char c;
/* Remove crud from the beginning.. */