Constify some input pointers
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
3ea7fdd96c
commit
2439222375
4 changed files with 4 additions and 4 deletions
|
@ -359,7 +359,7 @@ static int check_mountpoint(alpm_handle_t *handle, alpm_mountpoint_t *mp)
|
||||||
}
|
}
|
||||||
|
|
||||||
int _alpm_check_downloadspace(alpm_handle_t *handle, const char *cachedir,
|
int _alpm_check_downloadspace(alpm_handle_t *handle, const char *cachedir,
|
||||||
size_t num_files, off_t *file_sizes)
|
size_t num_files, const off_t *file_sizes)
|
||||||
{
|
{
|
||||||
alpm_list_t *mount_points;
|
alpm_list_t *mount_points;
|
||||||
alpm_mountpoint_t *cachedir_mp;
|
alpm_mountpoint_t *cachedir_mp;
|
||||||
|
|
|
@ -58,6 +58,6 @@ typedef struct __alpm_mountpoint_t {
|
||||||
|
|
||||||
int _alpm_check_diskspace(alpm_handle_t *handle);
|
int _alpm_check_diskspace(alpm_handle_t *handle);
|
||||||
int _alpm_check_downloadspace(alpm_handle_t *handle, const char *cachedir,
|
int _alpm_check_downloadspace(alpm_handle_t *handle, const char *cachedir,
|
||||||
size_t num_files, off_t *file_sizes);
|
size_t num_files, const off_t *file_sizes);
|
||||||
|
|
||||||
#endif /* ALPM_DISKSPACE_H */
|
#endif /* ALPM_DISKSPACE_H */
|
||||||
|
|
|
@ -1006,7 +1006,7 @@ static int sha256_file(const char *path, unsigned char output[32])
|
||||||
* @return a NULL terminated string with the hexadecimal representation of
|
* @return a NULL terminated string with the hexadecimal representation of
|
||||||
* bytes or NULL on error. This string must be freed.
|
* bytes or NULL on error. This string must be freed.
|
||||||
*/
|
*/
|
||||||
static char *hex_representation(unsigned char *bytes, size_t size)
|
static char *hex_representation(const unsigned char *bytes, size_t size)
|
||||||
{
|
{
|
||||||
static const char *hex_digits = "0123456789abcdef";
|
static const char *hex_digits = "0123456789abcdef";
|
||||||
char *str;
|
char *str;
|
||||||
|
|
|
@ -515,7 +515,7 @@ void string_display(const char *title, const char *string, unsigned short cols)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void table_print_line(const alpm_list_t *line, short col_padding,
|
static void table_print_line(const alpm_list_t *line, short col_padding,
|
||||||
size_t colcount, size_t *widths, int *has_data)
|
size_t colcount, const size_t *widths, const int *has_data)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
int need_padding = 0;
|
int need_padding = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue