const char* pakfire_relpath(struct pakfire* pakfire, const char* path);
#define pakfire_make_cache_path(pakfire, path, format, ...) \
- __pakfire_make_cache_path(pakfire, path, sizeof(path) - 1, format, __VA_ARGS__)
+ __pakfire_make_cache_path(pakfire, path, sizeof(path), format, __VA_ARGS__)
int __pakfire_make_cache_path(struct pakfire* pakfire, char* path, size_t length,
const char* format, ...) __attribute__((format(printf, 4, 5)));
char* pakfire_string_join(char** list, const char* delim);
#define pakfire_format_size(dst, value) \
- __pakfire_format_size(dst, sizeof(dst) - 1, value)
+ __pakfire_format_size(dst, sizeof(dst), value)
int __pakfire_format_size(char* dst, size_t length, double value);
int pakfire_format_speed(char* dst, size_t length, double value);
if (t <= 0)
return NULL;
- int r = pakfire_format_speed(widget->buffer, sizeof(widget->buffer) - 1, p->value / t);
+ int r = pakfire_format_speed(widget->buffer, sizeof(widget->buffer), p->value / t);
if (r < 0)
return NULL;
char database[PATH_MAX];
// Write the database
- r = pakfire_repo_write_database(repo, path, database, sizeof(database) - 1);
+ r = pakfire_repo_write_database(repo, path, database, sizeof(database));
if (r)
return r;