Prepare for running clang-format

Some of the existing comments cause clang-format to reformat them
strangely, so modify them to something more expected by the tool.

Also, the tool may decide to "join" several lines of concatenated string
literals if a line begins with a macro string literal. That's not
wanted, so fix up that case too.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
Patrick McCarty
2016-03-03 08:39:11 -08:00
parent 71ced644d7
commit eef6afe2f1
3 changed files with 18 additions and 15 deletions
+3 -3
View File
@@ -296,7 +296,7 @@ int main(int argc, char **argv)
match_manifests(old_full, new_full);
apply_heuristics(new_full);
#warning disabled rename detection for some simplicity
/* rename_detection(new_full); */
// rename_detection(new_full);
print_elapsed_time(&previous_time, &current_time);
@@ -329,9 +329,9 @@ int main(int argc, char **argv)
/* Step 3c: ... else save the manifest */
type_change_detection(new_core);
/* Detect renamed files specifically for each pack */
#warning disabled rename detection for some simplicity
/* rename_detection(...); */
/* Detect renamed files specifically for each pack */
// rename_detection(...);
sort_manifest_by_version(new_core);
newfiles = prune_manifest(new_core);
+13 -10
View File
@@ -398,11 +398,13 @@ int match_manifests(struct manifest *m1, struct manifest *m2)
}
if (ret < 0) {
struct file *file3;
/*
* if we get here, file1 got deleted... what we must do is add a file entry for it in the target list.
* However, since we're currently walking the list we HAVE to prepend the entry.. and mark for sort at
* the end.
*/
/*
* if we get here, file1 got deleted... what we must do
* is add a file entry for it in the target list.
* However, since we're currently walking the list we
* HAVE to prepend the entry.. and mark for sort at the
* end.
*/
file3 = calloc(1, sizeof(struct file));
if (file3 == NULL) {
assert(0);
@@ -458,11 +460,12 @@ int match_manifests(struct manifest *m1, struct manifest *m2)
first = 0;
}
count++;
/*
* if we get here, file1 got deleted... what we must do is add a file entry for it in the target list.
* However, since we're currently walking the list we HAVE to prepend the entry.. and mark for sort at
* the end.
*/
/*
* if we get here, file1 got deleted... what we must do is add
* a file entry for it in the target list. However, since
* we're currently walking the list we HAVE to prepend the
* entry.. and mark for sort at the end.
*/
file3 = calloc(1, sizeof(struct file));
if (file3 == NULL) {
assert(0);
+2 -2
View File
@@ -113,8 +113,8 @@ static void explode_pack_stage(int version, char *module)
* the resulting pack is slightly smaller, and in addition, we're saving CPU
* time on the client...
*/
string_or_die(&tar, "tar --directory=%s/%s/%i/staged --warning=no-timestamp "
TAR_PERM_ATTR_ARGS " -xf %s", packstage_dir, module, version, path);
string_or_die(&tar, "tar --directory=%s/%s/%i/staged --warning=no-timestamp " TAR_PERM_ATTR_ARGS
" -xf %s", packstage_dir, module, version, path);
ret = system(tar);
if (!ret) {
unlink(path);