Skip to content

Commit

Permalink
changed var type to size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
karina-ranadive committed Jul 20, 2023
1 parent 6fd978c commit 444a541
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/getopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ int getopt_parse(getopt_t *gopt, int argc, char *argv[], int showErrors)

if (!strncmp(tok,"-",1) && strncmp(tok,"--",2)) {
size_t len = strlen(tok);
int pos;
size_t pos;
for (pos = 1; pos < len; pos++) {
char sopt[2];
sopt[0] = tok[pos];
Expand Down
2 changes: 1 addition & 1 deletion common/pam.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pam_t *pam_create_from_file(const char *inpath)
continue;

size_t linelen = strlen(line);
for (int idx = 0; idx < linelen; idx++) {
for (size_t idx = 0; idx < linelen; idx++) {
if (line[idx] == ' ') {
line[idx] = 0;
if (tok1) {
Expand Down
2 changes: 1 addition & 1 deletion common/string_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ char *str_replace(const char *haystack, const char *needle, const char *replacem
size_t haystack_len = strlen(haystack);
size_t needle_len = strlen(needle);

int pos = 0;
size_t pos = 0;
while (pos < haystack_len) {
if (needle_len > 0 && str_starts_with(&haystack[pos], needle)) {
string_buffer_append_string(sb, replacement);
Expand Down

0 comments on commit 444a541

Please sign in to comment.