libcmd: Don't increment array then discard result

We don't need to increment argv here, as we're about to return
to the caller.

Change-Id: I442fe741e4bda91e12375a6fe72657dc215c4e78
Reviewed-on: http://gerrit.openafs.org/5078
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
Simon Wilkinson 2010-06-15 18:09:53 +01:00 committed by Jeffrey Altman
parent e3d9821a8b
commit 364d1bec74

View File

@ -1159,7 +1159,7 @@ CopyBackArgs(struct cmd_token *alist, char **argv,
argv++;
count++;
}
*(argv++) = 0; /* use last slot for terminating null */
*argv = NULL; /* use last slot for terminating null */
/* don't count terminating null */
*an = count;
return 0;