nvme_manage: Rely on fgets to NULL terminate string
fgets guarantees that strings returned are NULL terminated, so delete logic that attempts to insert a NULL terminator. Change-Id: Ibeadcda9af431091b04daff41596d5738419b43f Signed-off-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
parent
ef91841763
commit
fcc2eec870
@ -786,7 +786,6 @@ update_firmware_image(void)
|
|||||||
while (getchar() != '\n');
|
while (getchar() != '\n');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
path[strlen(path) - 1] = '\0';
|
|
||||||
|
|
||||||
fd = open(path, O_RDONLY);
|
fd = open(path, O_RDONLY);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user