Minor scope/typing cleanups

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2009-10-11 14:19:55 -05:00
parent 4828d9ef7c
commit 302310c5aa
2 changed files with 4 additions and 4 deletions

View File

@ -612,7 +612,7 @@ static char *get_filename(const char *url) {
static char *get_destfile(const char *path, const char *filename) {
char *destfile;
/* len = localpath len + filename len + null */
int len = strlen(path) + strlen(filename) + 1;
size_t len = strlen(path) + strlen(filename) + 1;
destfile = calloc(len, sizeof(char));
snprintf(destfile, len, "%s%s", path, filename);
@ -622,7 +622,7 @@ static char *get_destfile(const char *path, const char *filename) {
static char *get_tempfile(const char *path, const char *filename) {
char *tempfile;
/* len = localpath len + filename len + '.part' len + null */
int len = strlen(path) + strlen(filename) + 6;
size_t len = strlen(path) + strlen(filename) + 6;
tempfile = calloc(len, sizeof(char));
snprintf(tempfile, len, "%s%s.part", path, filename);

View File

@ -453,13 +453,13 @@ void string_display(const char *title, const char *string)
int len = 0;
if(title) {
/* compute the length of title + a space */
len = string_length(title) + 1;
printf("%s ", title);
}
if(string == NULL || string[0] == '\0') {
printf(_("None"));
} else {
/* compute the length of title + a space */
len = string_length(title) + 1;
indentprint(string, len);
}
printf("\n");