Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void shiftArgs(COMMAND *comm, int pos) {
- while (*comm.args[pos + 1] != NULL) {
- *comm.args[pos] = realloc(*comm.args[pos], sizeof(*comm.args[pos + 1]));
- strcpy(*comm.args[pos], *comm.args[pos + 1]);
- pos++;
- }
- *comm.args[pos] = malloc(sizeof( NULL ));
- *comm.args[pos] = NULL;
- free(*comm.args[pos + 1]);
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement