diff options
Diffstat (limited to 'src/lib/core')
| -rw-r--r-- | src/lib/core/artifactory.c | 14 | ||||
| -rw-r--r-- | src/lib/core/conda.c | 16 | ||||
| -rw-r--r-- | src/lib/core/copy.c | 6 | ||||
| -rw-r--r-- | src/lib/core/download.c | 18 | ||||
| -rw-r--r-- | src/lib/core/environment.c | 8 | ||||
| -rw-r--r-- | src/lib/core/ini.c | 2 | ||||
| -rw-r--r-- | src/lib/core/junitxml.c | 14 | ||||
| -rw-r--r-- | src/lib/core/multiprocessing.c | 6 | ||||
| -rw-r--r-- | src/lib/core/relocation.c | 2 | ||||
| -rw-r--r-- | src/lib/core/semaphore.c | 2 | ||||
| -rw-r--r-- | src/lib/core/str.c | 2 | ||||
| -rw-r--r-- | src/lib/core/template.c | 26 | ||||
| -rw-r--r-- | src/lib/core/utils.c | 22 | ||||
| -rw-r--r-- | src/lib/core/wheel.c | 4 |
14 files changed, 71 insertions, 71 deletions
diff --git a/src/lib/core/artifactory.c b/src/lib/core/artifactory.c index 54f4ba0..1e9de84 100644 --- a/src/lib/core/artifactory.c +++ b/src/lib/core/artifactory.c @@ -8,7 +8,7 @@ int artifactory_download_cli(char *dest, char *os, char *arch, char *remote_filename) { - SYSDEBUG("%s", "ARGS follow"); + SYSDEBUG("ARGS follow"); SYSDEBUG("dest=%s", dest); SYSDEBUG("jfrog_artifactory_base_url=%s", jfrog_artifactory_base_url); SYSDEBUG("jfrog_artifactory_product=%s", jfrog_artifactory_product); @@ -24,7 +24,7 @@ int artifactory_download_cli(char *dest, char arch_ident[STASIS_NAME_MAX] = {0}; // convert platform string to lower-case - SYSDEBUG("%s", "Set os_ident"); + SYSDEBUG("Set os_ident"); strncpy(os_ident, os, sizeof(os_ident) - 1); os_ident[sizeof(os_ident) - 1] = '\0'; tolower_s(os_ident); @@ -43,7 +43,7 @@ int artifactory_download_cli(char *dest, } // translate ARCH identifier - SYSDEBUG("%s", "Set arch_ident"); + SYSDEBUG("Set arch_ident"); strncpy(arch_ident, arch, sizeof(arch_ident) - 1); arch_ident[sizeof(arch_ident) - 1] = '\0'; SYSDEBUG("arch_ident=%s", arch_ident); @@ -65,7 +65,7 @@ int artifactory_download_cli(char *dest, arch_ident[sizeof(arch_ident) - 1] = '\0'; - SYSDEBUG("%s", "Construct URL"); + SYSDEBUG("Construct URL"); snprintf(url, sizeof(url), "%s/%s/%s/%s/%s-%s-%s/%s", jfrog_artifactory_base_url, // https://releases.jfrog.io/artifactory jfrog_artifactory_product, // jfrog-cli @@ -83,7 +83,7 @@ int artifactory_download_cli(char *dest, return -1; } - SYSDEBUG("%s", "Construct path to write data"); + SYSDEBUG("Construct path to write data"); SYSDEBUG("path buffer contents: '%s'", path); SYSDEBUG("path buffer size: %zu", sizeof(path)); SYSDEBUG("path strlen: %zu", strlen(path)); @@ -91,10 +91,10 @@ int artifactory_download_cli(char *dest, snprintf(path + strlen(path), sizeof(path) - strlen(path), "/%s", remote_filename); char *errmsg = NULL; - SYSDEBUG("%s", "Downloading..."); + SYSDEBUG("Downloading..."); long fetch_status = download(url, path, &errmsg); if (HTTP_ERROR(fetch_status)) { - SYSERROR("download failed: %s: %s\n", errmsg, url); + SYSERROR("download failed: %s: %s", errmsg, url); return -1; } chmod(path, 0755); diff --git a/src/lib/core/conda.c b/src/lib/core/conda.c index 4597128..0259e82 100644 --- a/src/lib/core/conda.c +++ b/src/lib/core/conda.c @@ -20,7 +20,7 @@ int micromamba(const struct MicromambaInfo *info, char *command, ...) { } if (!info->download_dir || isempty(info->download_dir)) { - SYSERROR("%s", "micromamba inf->download_dir is NULL, or empty"); + SYSERROR("micromamba inf->download_dir is NULL, or empty"); return -1; } @@ -65,12 +65,12 @@ int micromamba(const struct MicromambaInfo *info, char *command, ...) { va_list args; int cmd_len = snprintf(cmd, sizeof(cmd), "%s -r %s -p %s ", mmbin, info->conda_prefix, info->conda_prefix); if (cmd_len < 0) { - SYSERROR("%s", "Unable to build argument list for micromamba"); + SYSERROR("Unable to build argument list for micromamba"); va_end(args); return -1; } if ((size_t) cmd_len > sizeof(cmd)) { - SYSERROR("%s", "micromamba command truncated"); + SYSERROR("micromamba command truncated"); va_end(args); return -1; } @@ -78,12 +78,12 @@ int micromamba(const struct MicromambaInfo *info, char *command, ...) { va_start(args, command); cmd_len = vsnprintf(cmd + strlen(cmd), sizeof(cmd) - strlen(cmd), command, args); if (cmd_len < 0) { - SYSERROR("%s", "Unable to append arguments to micromamba command"); + SYSERROR("Unable to append arguments to micromamba command"); va_end(args); return -1; } if ((size_t) cmd_len > sizeof(cmd)) { - SYSERROR("%s", "micromamba command truncated while appending arguments"); + SYSERROR("micromamba command truncated while appending arguments"); va_end(args); return -1; } @@ -111,7 +111,7 @@ int python_exec(const char *args) { char *command = NULL; if (asprintf(&command, "%s%s", command_base, args) < 0 || !command) { - SYSERROR("%s", "Unable to allocate command string"); + SYSERROR("Unable to allocate command string"); return -1; } msg(STASIS_MSG_L3, "Executing: %s\n", command); @@ -126,7 +126,7 @@ int pip_exec(const char *args) { char *command = NULL; if (asprintf(&command, "%s%s", command_base, args) < 0 || !command) { - SYSERROR("%s", "Unable to allocate command string"); + SYSERROR("Unable to allocate command string"); return -1; } msg(STASIS_MSG_L3, "Executing: %s\n", command); @@ -646,7 +646,7 @@ int conda_env_create_from_uri(char *name, char *uri, char *python_version) { const char *fmt = "env create -n '%s' --file='%s'"; char *env_command = NULL; if (asprintf(&env_command, fmt, name, tempfile) < 0 || !env_command) { - SYSERROR("%s", "unable to allocate environment command"); + SYSERROR("unable to allocate environment command"); return -1; } diff --git a/src/lib/core/copy.c b/src/lib/core/copy.c index 6697f59..ed545cc 100644 --- a/src/lib/core/copy.c +++ b/src/lib/core/copy.c @@ -48,14 +48,14 @@ int copy2(const char *src, const char *dest, unsigned int op) { } else if (S_ISREG(src_stat.st_mode)) { char buf[STASIS_BUFSIZ] = {0}; size_t bytes_read; - SYSDEBUG("%s", "Opening source file for reading"); + SYSDEBUG("Opening source file for reading"); FILE *fp1 = fopen(src, "rb"); if (!fp1) { perror(src); return -1; } - SYSDEBUG("%s", "Opening destination file for writing"); + SYSDEBUG("Opening destination file for writing"); FILE *fp2 = fopen(dest, "w+b"); if (!fp2) { perror(dest); @@ -86,6 +86,6 @@ int copy2(const char *src, const char *dest, unsigned int op) { errno = EOPNOTSUPP; return -1; } - SYSDEBUG("%s", "Data copied"); + SYSDEBUG("Data copied"); return 0; } diff --git a/src/lib/core/download.c b/src/lib/core/download.c index eb24351..ef1474f 100644 --- a/src/lib/core/download.c +++ b/src/lib/core/download.c @@ -11,7 +11,7 @@ size_t download_writer(void *fp, size_t size, size_t nmemb, void *stream) { } long download(char *url, const char *filename, char **errmsg) { - SYSDEBUG("%s", "ARGS follow"); + SYSDEBUG("ARGS follow"); SYSDEBUG("url=%s", url); SYSDEBUG("filename=%s", filename); SYSDEBUG("errmsg=%s (NULL is OK)", *errmsg); @@ -19,7 +19,7 @@ long download(char *url, const char *filename, char **errmsg) { char user_agent[STASIS_NAME_MAX] = {0}; snprintf(user_agent, sizeof(user_agent), "stasis/%s", STASIS_VERSION); - SYSDEBUG("%s", "Setting timeout"); + SYSDEBUG("Setting timeout"); size_t timeout_default = 30L; size_t timeout = timeout_default; const char *timeout_str = getenv("STASIS_DOWNLOAD_TIMEOUT"); @@ -31,7 +31,7 @@ long download(char *url, const char *filename, char **errmsg) { } } - SYSDEBUG("%s", "Setting max_retries"); + SYSDEBUG("Setting max_retries"); const size_t max_retries_default = 5; size_t max_retries = max_retries_default; const char *max_retries_str = getenv("STASIS_DOWNLOAD_RETRY_MAX"); @@ -43,7 +43,7 @@ long download(char *url, const char *filename, char **errmsg) { } } - SYSDEBUG("%s", "Setting max_retry_seconds"); + SYSDEBUG("Setting max_retry_seconds"); const size_t max_retry_seconds_default = 3; size_t max_retry_seconds = max_retry_seconds_default; const char *max_retry_seconds_str = getenv("STASIS_DOWNLOAD_RETRY_SECONDS"); @@ -56,7 +56,7 @@ long download(char *url, const char *filename, char **errmsg) { } - SYSDEBUG("%s", "Initializing curl context"); + SYSDEBUG("Initializing curl context"); curl_global_init(CURL_GLOBAL_ALL); CURL *c = curl_easy_init(); for (size_t retry = 0; retry < max_retries; retry++) { @@ -64,7 +64,7 @@ long download(char *url, const char *filename, char **errmsg) { fprintf(stderr, "[RETRY %zu/%zu] %s: %s\n", retry + 1, max_retries, *errmsg, url); } - SYSDEBUG("%s", "Configuring curl"); + SYSDEBUG("Configuring curl"); curl_easy_setopt(c, CURLOPT_URL, url); curl_easy_setopt(c, CURLOPT_WRITEFUNCTION, download_writer); FILE *fp = fopen(filename, "wb"); @@ -87,10 +87,10 @@ long download(char *url, const char *filename, char **errmsg) { SYSDEBUG("curl failed with code: %s", curl_easy_strerror(curl_code)); const size_t errmsg_maxlen = 256; if (!*errmsg) { - SYSDEBUG("%s", "allocating memory for error message"); + SYSDEBUG("allocating memory for error message"); *errmsg = calloc(errmsg_maxlen, sizeof(char)); if (!*errmsg) { - SYSERROR("%s", "unable to allocate memory for error message"); + SYSERROR("unable to allocate memory for error message"); goto cleanup; } } @@ -102,7 +102,7 @@ long download(char *url, const char *filename, char **errmsg) { } cleanup: - SYSDEBUG("%s", "Cleaning up"); + SYSDEBUG("Cleaning up"); // Data written. Clean up. fclose(fp); diff --git a/src/lib/core/environment.c b/src/lib/core/environment.c index 1bd9d28..d81c3d1 100644 --- a/src/lib/core/environment.c +++ b/src/lib/core/environment.c @@ -414,19 +414,19 @@ void runtime_set(RuntimeEnv *env, const char *_key, char *_value) { const ssize_t key_offset = runtime_contains(env, _key); char *key = strdup(_key); if (!key) { - SYSERROR("%s", "unable to allocate memory for key"); + SYSERROR("unable to allocate memory for key"); exit(1); } char *value = runtime_expand_var(env, _value); if (!value) { - SYSERROR("%s", "unable to allocate memory for value"); + SYSERROR("unable to allocate memory for value"); exit(1); } lstrip(value); char *now = join((char *[]) {key, value, NULL}, sep); if (!now) { - SYSERROR("%s", "unable to allocate memory for join"); + SYSERROR("unable to allocate memory for join"); exit(1); } @@ -448,7 +448,7 @@ void runtime_apply(RuntimeEnv *env) { for (size_t i = 0; i < strlist_count(env); i++) { char **pair = split(strlist_item(env, i), "=", 1); if (!pair) { - SYSERROR("%s", "unable to allocate memory for runtime_apply"); + SYSERROR("unable to allocate memory for runtime_apply"); return; } setenv(pair[0], pair[1], 1); diff --git a/src/lib/core/ini.c b/src/lib/core/ini.c index ea8c0dd..183aa6b 100644 --- a/src/lib/core/ini.c +++ b/src/lib/core/ini.c @@ -464,7 +464,7 @@ int ini_write(struct INIFILE *ini, FILE **stream, unsigned mode) { } if (!render) { - SYSERROR("%s", "rendered string value can never be NULL!\n"); + SYSERROR("rendered string value can never be NULL!"); return -1; } diff --git a/src/lib/core/junitxml.c b/src/lib/core/junitxml.c index caf21cb..a59cb9d 100644 --- a/src/lib/core/junitxml.c +++ b/src/lib/core/junitxml.c @@ -79,7 +79,7 @@ static struct JUNIT_Failure *testcase_failure_from_attributes(struct StrList *at if (!strcmp(attr_name, "message")) { result->message = strdup(attr_value); if (!result->message) { - SYSERROR("%s", "failed to allocate memory for testcase failure message"); + SYSERROR("failed to allocate memory for testcase failure message"); break; } } @@ -100,7 +100,7 @@ static struct JUNIT_Error *testcase_error_from_attributes(struct StrList *attrs) if (!strcmp(attr_name, "message")) { result->message = strdup(attr_value); if (!result->message) { - SYSERROR("%s", "failed to allocate memory for testcase error message"); + SYSERROR("failed to allocate memory for testcase error message"); break; } } @@ -121,7 +121,7 @@ static struct JUNIT_Skipped *testcase_skipped_from_attributes(struct StrList *at if (!strcmp(attr_name, "message")) { result->message = strdup(attr_value); if (!result->message) { - SYSERROR("%s", "failed to allocate memory for testcase skip message"); + SYSERROR("failed to allocate memory for testcase skip message"); break; } } @@ -133,7 +133,7 @@ static struct JUNIT_Skipped *testcase_skipped_from_attributes(struct StrList *at static struct JUNIT_Testcase *testcase_from_attributes(struct StrList *attrs) { struct JUNIT_Testcase *result = calloc(1, sizeof(*result)); if(!result) { - SYSERROR("%s", "failed to allocate memory for testcase"); + SYSERROR("failed to allocate memory for testcase"); return NULL; } for (size_t x = 0; x < strlist_count(attrs); x += 2) { @@ -143,14 +143,14 @@ static struct JUNIT_Testcase *testcase_from_attributes(struct StrList *attrs) { if (!strcmp(attr_name, "name")) { result->name = strdup(attr_value); if (!result->name) { - SYSERROR("%s", "failed to allocate memory for testcase name"); + SYSERROR("failed to allocate memory for testcase name"); testcase_free(&result); break; } } else if (!strcmp(attr_name, "classname")) { result->classname = strdup(attr_value); if (!result->classname) { - SYSERROR("%s", "failed to allocate memory for testcase class name"); + SYSERROR("failed to allocate memory for testcase class name"); testcase_free(&result); break; } @@ -159,7 +159,7 @@ static struct JUNIT_Testcase *testcase_from_attributes(struct StrList *attrs) { } else if (!strcmp(attr_name, "message")) { result->message = strdup(attr_value); if (!result->message) { - SYSERROR("%s", "failed to allocate memory for testcase message"); + SYSERROR("failed to allocate memory for testcase message"); testcase_free(&result); break; } diff --git a/src/lib/core/multiprocessing.c b/src/lib/core/multiprocessing.c index cf0f3d7..ffc6b95 100644 --- a/src/lib/core/multiprocessing.c +++ b/src/lib/core/multiprocessing.c @@ -158,7 +158,7 @@ static int mp_task_fork(struct MultiProcessingPool *pool, struct MultiProcessing } struct MultiProcessingTask *mp_pool_task(struct MultiProcessingPool *pool, const char *ident, char *working_dir, char *cmd) { - SYSDEBUG("%s", "Finding next available slot"); + SYSDEBUG("Finding next available slot"); struct MultiProcessingTask *slot = mp_pool_next_available(pool); if (pool->num_used != pool->num_alloc) { SYSDEBUG("Using slot %zu of %zu", pool->num_used, pool->num_alloc); @@ -196,14 +196,14 @@ struct MultiProcessingTask *mp_pool_task(struct MultiProcessingPool *pool, const t_name = xmkstemp(&tp, "w"); if (!t_name) { - SYSERROR("%s", "Failed to create temporary file name"); + SYSERROR("Failed to create temporary file name"); if (tp) { fclose(tp); } return NULL; } if (!tp) { - SYSERROR("%s", "Failed to create temporary file"); + SYSERROR("Failed to create temporary file"); guard_free(t_name); return NULL; } diff --git a/src/lib/core/relocation.c b/src/lib/core/relocation.c index 16376b3..348bad1 100644 --- a/src/lib/core/relocation.c +++ b/src/lib/core/relocation.c @@ -36,7 +36,7 @@ int replace_text(char *original, const char *target, const char *replacement, un if (original_len > sizeof(buffer)) { errno = EINVAL; - SYSERROR("The original string is larger than buffer: %zu > %zu\n", original_len, sizeof(buffer)); + SYSERROR("The original string is larger than buffer: %zu > %zu", original_len, sizeof(buffer)); return -1; } diff --git a/src/lib/core/semaphore.c b/src/lib/core/semaphore.c index 3a2ffb6..7ac1549 100644 --- a/src/lib/core/semaphore.c +++ b/src/lib/core/semaphore.c @@ -72,7 +72,7 @@ int semaphore_post(struct Semaphore *s) { void semaphore_destroy(struct Semaphore *s) { if (!s) { - SYSDEBUG("%s", "would have crashed"); + SYSDEBUG("would have crashed"); return; } SYSDEBUG("%s", s->name); diff --git a/src/lib/core/str.c b/src/lib/core/str.c index a08bd2b..7ba6c5b 100644 --- a/src/lib/core/str.c +++ b/src/lib/core/str.c @@ -588,7 +588,7 @@ char **strdup_array(char **array) { // Create new array result = calloc(elems + 1, sizeof(*result)); if (!result) { - SYSERROR("%s", "could not allocate memory for result array"); + SYSERROR("could not allocate memory for result array"); return NULL; } for (size_t i = 0; i < elems; i++) { diff --git a/src/lib/core/template.c b/src/lib/core/template.c index 3b6f58d..cdf8e58 100644 --- a/src/lib/core/template.c +++ b/src/lib/core/template.c @@ -20,7 +20,7 @@ struct tplfunc_frame *tpl_pool_func[1024] = {0}; unsigned tpl_pool_func_used = 0; extern void tpl_reset() { - SYSDEBUG("%s", "Resetting template engine"); + SYSDEBUG("Resetting template engine"); tpl_free(); tpl_pool_used = 0; tpl_pool_func_used = 0; @@ -29,13 +29,13 @@ extern void tpl_reset() { void tpl_register_func(char *key, void *tplfunc_ptr, int argc, void *data_in) { struct tplfunc_frame *frame = calloc(1, sizeof(*frame)); if (!frame) { - SYSERROR("%s", "unable to allocate memory for function frame"); + SYSERROR("unable to allocate memory for function frame"); exit(1); } frame->key = strdup(key); if (!frame->key) { - SYSERROR("%s", "unable to allocate memory for function frame key"); + SYSERROR("unable to allocate memory for function frame key"); exit(1); } frame->argc = argc; @@ -52,12 +52,12 @@ int tpl_key_exists(char *key) { for (size_t i = 0; i < tpl_pool_used; i++) { if (tpl_pool[i]->key) { if (!strcmp(tpl_pool[i]->key, key)) { - SYSDEBUG("%s", "YES"); + SYSDEBUG("YES"); return true; } } } - SYSDEBUG("%s", "NO"); + SYSDEBUG("NO"); return false; } @@ -76,17 +76,17 @@ void tpl_register(char *key, char **ptr) { } } replacing = 1; - SYSDEBUG("%s", "Item will be replaced"); + SYSDEBUG("Item will be replaced"); } else { - SYSDEBUG("%s", "Creating new item"); + SYSDEBUG("Creating new item"); item = calloc(1, sizeof(*item)); if (!item) { - SYSERROR("%s", "unable to allocate memory for new item"); + SYSERROR("unable to allocate memory for new item"); exit(1); } item->key = strdup(key); if (!key) { - SYSERROR("%s", "unable to allocate memory for new key"); + SYSERROR("unable to allocate memory for new key"); exit(1); } } @@ -186,7 +186,7 @@ char *tpl_render(char *str) { } // Read key name - SYSDEBUG("%s", "Reading key"); + SYSDEBUG("Reading key"); size_t key_len = 0; while (isalnum(pos[off]) || pos[off] != '}') { if (isspace(pos[off]) || isblank(pos[off])) { @@ -207,10 +207,10 @@ char *tpl_render(char *str) { int do_func = 0; if (type_stop) { if (!strncmp(key, "env", type_stop - key)) { - SYSDEBUG("%s", "Will render as value of environment variable"); + SYSDEBUG("Will render as value of environment variable"); do_env = 1; } else if (!strncmp(key, "func", type_stop - key)) { - SYSDEBUG("%s", "Will render as output from function"); + SYSDEBUG("Will render as output from function"); do_func = 1; } } @@ -327,7 +327,7 @@ int tpl_render_to_file(char *str, const char *filename) { // Write rendered string to file fprintf(fp, "%s", result); fclose(fp); - SYSDEBUG("%s", "Rendered successfully"); + SYSDEBUG("Rendered successfully"); guard_free(result); return 0; diff --git a/src/lib/core/utils.c b/src/lib/core/utils.c index e6a8315..264f23d 100644 --- a/src/lib/core/utils.c +++ b/src/lib/core/utils.c @@ -466,18 +466,18 @@ void msg(unsigned type, char *fmt, ...) { } if (fprintf(stream, "%s", header) < 0) { - SYSERROR("%s", "unable to write message header to stream"); + SYSERROR("unable to write message header to stream"); return; } const int len = vfprintf(stream, fmt, args); if (len < 0) { - SYSERROR("%s", "unable to write message to stream"); + SYSERROR("unable to write message to stream"); return; } if (fprintf(stream, "%s", STASIS_COLOR_RESET) < 0) { - SYSERROR("%s", "unable to write message footer to stream"); + SYSERROR("unable to write message footer to stream"); return; } va_end(args); @@ -670,7 +670,7 @@ int fix_tox_conf(const char *filename, char **result, size_t maxlen) { // Create new temporary tox configuration file char *tempfile = xmkstemp(&fptemp, "w+"); if (!tempfile) { - SYSERROR("%s", "unable to create temporary file"); + SYSERROR("unable to create temporary file"); return -1; } @@ -828,7 +828,7 @@ struct StrList *listdir(const char *path) { } char *fullpath = join_ex("/", path, rec->d_name, NULL); if (!fullpath) { - SYSERROR("%s", "Unable to allocate bytes to construct full path"); + SYSERROR("Unable to allocate bytes to construct full path"); guard_strlist_free(&node); closedir(dp); return NULL; @@ -878,13 +878,13 @@ char *find_version_spec(char *str) { int env_manipulate_pathstr(const char *key, char *path, int mode) { if (isempty(path)) { - SYSERROR("%s", "New PATH element cannot be zero-length or NULL"); + SYSERROR("New PATH element cannot be zero-length or NULL"); return -1; } const char *system_path_old = getenv("PATH"); if (!system_path_old) { - SYSERROR("%s", "Unable to read PATH"); + SYSERROR("Unable to read PATH"); return -1; } @@ -897,7 +897,7 @@ int env_manipulate_pathstr(const char *key, char *path, int mode) { } if (!system_path_new) { - SYSERROR("%s", "Unable to allocate memory to update PATH"); + SYSERROR("Unable to allocate memory to update PATH"); return -1; } @@ -986,7 +986,7 @@ int grow(const size_t size_new, size_t *size_orig, char **data) { } if (size_new >= *size_orig) { const size_t new_size = *size_orig + size_new + 1; - SYSDEBUG("template data buffer new size: %zu\n", new_size); + SYSDEBUG("template data buffer new size: %zu", new_size); char *tmp = realloc(*data, new_size); if (!tmp) { @@ -1176,7 +1176,7 @@ int get_random_bytes(char *result, size_t maxlen) { if (filename != NULL) { fp = fopen(filename, "rb"); if (!fp) { - SYSERROR("%s", "unable to open random generator"); + SYSERROR("unable to open random generator"); return -1; } } @@ -1189,7 +1189,7 @@ int get_random_bytes(char *result, size_t maxlen) { ch = rand() % 255; } if (fp && ferror(fp)) { - SYSERROR("%s", "unable to read from random generator"); + SYSERROR("unable to read from random generator"); fclose(fp); return -1; } diff --git a/src/lib/core/wheel.c b/src/lib/core/wheel.c index 9f3b3c8..ef491c9 100644 --- a/src/lib/core/wheel.c +++ b/src/lib/core/wheel.c @@ -70,13 +70,13 @@ static ssize_t wheel_parse_wheel(struct Wheel * pkg, const char * data) { if (pair) { char *key = strdup(strip(pair[0])); if (!key) { - SYSERROR("%s", "could not allocate memory for pair wheel key"); + SYSERROR("could not allocate memory for pair wheel key"); return -1; } char *value = strdup(lstrip(pair[1])); if (!value) { - SYSERROR("%s", "could not allocate memory for wheel value"); + SYSERROR("could not allocate memory for wheel value"); guard_free(key); return -1; } |
