Skip to content

Commit 7885b10

Browse files
committed
{lib,bin/xbps-pkgdb}: make calloc argument order consistent
1 parent 15d5b29 commit 7885b10

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

bin/xbps-pkgdb/check_pkg_alternatives.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ relpath(char *from, char *to)
8585

8686
for (up = -1, from--; from && *from; from = strchr(from + 1, '/'), up++);
8787

88-
rel = calloc(3 * up + strlen(p) + 1, sizeof(char));
88+
rel = calloc(1, 3 * up + strlen(p) + 1);
8989

9090
while (up--)
9191
strcat(rel, "../");

lib/package_alternatives.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ relpath(char *from, char *to)
104104

105105
for (up = -1, from--; from && *from; from = strchr(from + 1, '/'), up++);
106106

107-
rel = calloc(3 * up + strlen(p) + 1, 1);
107+
rel = calloc(1, 3 * up + strlen(p) + 1);
108108
if (!rel)
109109
return NULL;
110110

0 commit comments

Comments
 (0)