Fix coding style

This commit is contained in:
Joel Rosdahl 2012-08-08 16:09:55 +02:00
parent 3849150ff1
commit 98f692f8a9
4 changed files with 8 additions and 6 deletions

8
args.c
View File

@ -177,7 +177,7 @@ args_insert(struct args *dest, int index, struct args *src, bool replace)
return;
}
dest->argv = (char**)x_realloc(
dest->argv = (char **)x_realloc(
dest->argv,
(src->argc + dest->argc + 1 - offset) *
sizeof(char *));
@ -214,7 +214,8 @@ args_free(struct args *args)
void
args_add(struct args *args, const char *s)
{
args->argv = (char**)x_realloc(args->argv, (args->argc + 2) * sizeof(char *));
args->argv = (char **)x_realloc(args->argv,
(args->argc + 2) * sizeof(char *));
args->argv[args->argc] = x_strdup(s);
args->argc++;
args->argv[args->argc] = NULL;
@ -263,7 +264,8 @@ args_remove_first(struct args *args)
void
args_add_prefix(struct args *args, const char *s)
{
args->argv = (char**)x_realloc(args->argv, (args->argc + 2) * sizeof(char *));
args->argv = (char **)x_realloc(args->argv,
(args->argc + 2) * sizeof(char *));
memmove(&args->argv[1], &args->argv[0],
(args->argc+1) * sizeof(args->argv[0]));
args->argv[0] = x_strdup(s);

View File

@ -92,7 +92,7 @@ void hash_buffer(struct mdfour *md, const void *s, size_t len);
char *hash_result(struct mdfour *md);
void hash_result_as_bytes(struct mdfour *md, unsigned char *out);
bool hash_equal(struct mdfour *md1, struct mdfour *md2);
void hash_delimiter(struct mdfour *md, const char* type);
void hash_delimiter(struct mdfour *md, const char *type);
void hash_string(struct mdfour *md, const char *s);
void hash_int(struct mdfour *md, int x);
bool hash_fd(struct mdfour *md, int fd);

2
conf.c
View File

@ -314,7 +314,7 @@ conf_create(void)
conf->temporary_dir = x_strdup("");
conf->umask = UINT_MAX; /* default: don't set umask */
conf->unify = false;
conf->item_origins = x_malloc(CONFITEMS_TOTAL_KEYWORDS * sizeof(char*));
conf->item_origins = x_malloc(CONFITEMS_TOTAL_KEYWORDS * sizeof(char *));
for (i = 0; i < CONFITEMS_TOTAL_KEYWORDS; ++i) {
conf->item_origins[i] = "default";
}

2
util.c
View File

@ -1275,7 +1275,7 @@ x_unlink(const char *path)
* file. We don't care if the temp file is trashed, so it's always safe to
* unlink it first.
*/
char* tmp_name = format("%s.%s.rmXXXXXX", path, tmp_string());
char *tmp_name = format("%s.%s.rmXXXXXX", path, tmp_string());
int result = 0;
cc_log("Unlink %s via %s", path, tmp_name);
if (x_rename(path, tmp_name) == -1) {