Fix whitespace and other formatting issues
This commit: -- replaces space-based indents with tabs per the coding standards -- removes extraneous whitespace (e.g. extra spaces between function args) -- adds missing braces for a one-line if statement Signed-off-by: Jason St. John <jstjohn@purdue.edu>
This commit is contained in:
parent
b7b3f9c5e7
commit
230bd5c2fd
25 changed files with 116 additions and 115 deletions
|
@ -920,7 +920,7 @@ char SYMEXPORT *alpm_compute_sha256sum(const char *filename)
|
||||||
return hex_representation(output, 32);
|
return hex_representation(output, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Calculates a file's MD5 or SHA2 digest and compares it to an expected value.
|
/** Calculates a file's MD5 or SHA-2 digest and compares it to an expected value.
|
||||||
* @param filepath path of the file to check
|
* @param filepath path of the file to check
|
||||||
* @param expected hash value to compare against
|
* @param expected hash value to compare against
|
||||||
* @param type digest type to use
|
* @param type digest type to use
|
||||||
|
|
|
@ -1336,7 +1336,7 @@ extract_sources() {
|
||||||
for netfile in "${source[@]}"; do
|
for netfile in "${source[@]}"; do
|
||||||
local file=$(get_filename "$netfile")
|
local file=$(get_filename "$netfile")
|
||||||
if in_array "$file" "${noextract[@]}"; then
|
if in_array "$file" "${noextract[@]}"; then
|
||||||
#skip source files in the noextract=() array
|
# skip source files in the noextract=() array
|
||||||
# these are marked explicitly to NOT be extracted
|
# these are marked explicitly to NOT be extracted
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -98,8 +98,9 @@ char *strndup(const char *s, size_t n)
|
||||||
size_t len = strnlen(s, n);
|
size_t len = strnlen(s, n);
|
||||||
char *new = (char *) malloc(len + 1);
|
char *new = (char *) malloc(len + 1);
|
||||||
|
|
||||||
if(new == NULL)
|
if(new == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
new[len] = '\0';
|
new[len] = '\0';
|
||||||
return (char *)memcpy(new, s, len);
|
return (char *)memcpy(new, s, len);
|
||||||
|
|
|
@ -206,7 +206,7 @@ void dump_pkg_full(alpm_pkg_t *pkg, int extra)
|
||||||
}
|
}
|
||||||
|
|
||||||
string_display(_("MD5 Sum :"), alpm_pkg_get_md5sum(pkg), cols);
|
string_display(_("MD5 Sum :"), alpm_pkg_get_md5sum(pkg), cols);
|
||||||
string_display(_("SHA256 Sum :"), alpm_pkg_get_sha256sum(pkg), cols);
|
string_display(_("SHA-256 Sum :"), alpm_pkg_get_sha256sum(pkg), cols);
|
||||||
list_display(_("Signatures :"), keys, cols);
|
list_display(_("Signatures :"), keys, cols);
|
||||||
} else {
|
} else {
|
||||||
list_display(_("Validated By :"), validation, cols);
|
list_display(_("Validated By :"), validation, cols);
|
||||||
|
|
|
@ -11,7 +11,7 @@ fi
|
||||||
. "$lib"
|
. "$lib"
|
||||||
|
|
||||||
if ! type -t human_to_size &>/dev/null; then
|
if ! type -t human_to_size &>/dev/null; then
|
||||||
printf 'Bail out! human_to_size function not found\n'
|
printf "Bail out! human_to_size function not found\n"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ fi
|
||||||
. "$lib"
|
. "$lib"
|
||||||
|
|
||||||
if ! type -t parseopts &>/dev/null; then
|
if ! type -t parseopts &>/dev/null; then
|
||||||
printf 'Bail out! parseopts function not found\n'
|
printf "Bail out! parseopts function not found\n"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue