Skip to content

Commit

Permalink
CodeQL fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Sep 14, 2024
1 parent 578b395 commit 9a8d010
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/smax-messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ int smaxSendProgress(double fraction, const char *msg) {
}

progress = malloc(10 + strlen(msg));
if(!progress) return x_error(X_NULL, errno, fn, "malloc() error (%d bytes)", 10 + strlen(msg));
if(!progress) return x_error(X_NULL, errno, fn, "malloc() error (%ld bytes)", 10 + (long) strlen(msg));

sprintf(progress, "%.1f %s", (100.0 * fraction), msg);

Expand Down
2 changes: 1 addition & 1 deletion src/smax-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ int smaxDeletePattern(const char *pattern) {
prop_error(fn, n);

metaPattern = (char *) malloc(strlen(pattern) + 20);
if(!metaPattern) return x_error(X_NULL, errno, fn, "malloc() error (%d bytes)", strlen(pattern) + 20);
if(!metaPattern) return x_error(X_NULL, errno, fn, "malloc() error (%ld bytes)", (long) strlen(pattern) + 20);

sprintf(metaPattern, "<*>" X_SEP "%s", pattern);
redisxDeleteEntries(smaxGetRedis(), metaPattern);
Expand Down

0 comments on commit 9a8d010

Please sign in to comment.