Browse Source

deprecated gets() -> fgets()

pre-master-46
Holger Vogt 6 years ago
parent
commit
53613f4e69
  1. 5
      src/xspice/ipc/ipcstdio.c

5
src/xspice/ipc/ipcstdio.c

@ -45,7 +45,10 @@ Ipc_Status_t ipc_transport_get_line (
NG_IGNORE(wait);
printf ("GET_LINE\n");
gets (str);
fgets (str, 512, stdin);
char *tmp = strchr(str, '\n');
if (tmp)
*tmp = '\0';
*len = (int) strlen (str);
return IPC_STATUS_OK;
}

Loading…
Cancel
Save