mirror of https://github.com/acidanthera/audk.git
BaseTools/EfiRom: Refine the logic in main()
This commit refines the logic for main(). It makes the logic more straightforward to prevent possible mis-reports by static code checkers. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
58356e9478
commit
31c295e71a
|
@ -101,11 +101,13 @@ Returns:
|
||||||
// Find the last . on the line and replace the filename extension with
|
// Find the last . on the line and replace the filename extension with
|
||||||
// the default
|
// the default
|
||||||
//
|
//
|
||||||
for (Ext = mOptions.OutFileName + strlen (mOptions.OutFileName) - 1;
|
Ext = mOptions.OutFileName + strlen (mOptions.OutFileName) - 1;
|
||||||
(Ext >= mOptions.OutFileName) && (*Ext != '.') && (*Ext != '\\');
|
while (Ext >= mOptions.OutFileName) {
|
||||||
Ext--
|
if ((*Ext == '.') || (*Ext == '\\')) {
|
||||||
)
|
break;
|
||||||
;
|
}
|
||||||
|
Ext--;
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// If dot here, then insert extension here, otherwise append
|
// If dot here, then insert extension here, otherwise append
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue