forked from auracaster/openocd
openocd: manually remove NULL comparisons
For the remaining NULL comparisons, remove then manually. While there, make more readable a loop, by moving the assigment out of the loop condition. Change-Id: I44193aaa95813156a3a79c16b80e1ad333dc1eaf Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6353 Tested-by: jenkins
This commit is contained in:
@@ -159,7 +159,7 @@ static void telnet_load_history(struct telnet_connection *t_con)
|
||||
|
||||
if (histfp) {
|
||||
|
||||
while (fgets(buffer, sizeof(buffer), histfp) != NULL) {
|
||||
while (fgets(buffer, sizeof(buffer), histfp)) {
|
||||
|
||||
char *p = strchr(buffer, '\n');
|
||||
if (p)
|
||||
|
||||
Reference in New Issue
Block a user