When checking overflow issue in param_dispaly(), we should use rc2
not rc, because rc2 is the return value of pathname string size.
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I35820b00c7a4e264444e5574967d56c54b4a469b
Reviewed-on: http://review.whamcloud.com/19759
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
* there isn't much point trying to use fprintf() */
continue;
}
- if (rc >= sizeof(pathname)) {
+ if (rc2 >= sizeof(pathname)) {
fprintf(stderr, "error: %s: overflow processing '%s'\n",
opname, pathname);
if (rc == 0)