Skip to content

Commit

Permalink
x.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Halo-Michael committed Jun 9, 2021
1 parent f46e2e3 commit c26689b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mount_bindfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ int main(int argc, char **argv) {
}

char *dir = (char *)calloc(MAXPATHLEN, sizeof(char));
if (realpath(argv[1], dir) == NULL)
if (realpath(argv[0], dir) == NULL)
err(errno, "realpath dir %s", dir);
dir = (char *)realloc(dir, (strlen(dir) + 1) * sizeof(char));

char *mountpoint = (char *)calloc(MAXPATHLEN, sizeof(char));
if (realpath(argv[0], mountpoint) == NULL)
if (realpath(argv[1], mountpoint) == NULL)
err(errno, "realpath mountpoint %s", mountpoint);
mountpoint = (char *)realloc(mountpoint, (strlen(mountpoint) + 1) * sizeof(char));

Expand Down

0 comments on commit c26689b

Please sign in to comment.