Compare commits

..

No commits in common. "1dd16bc0df85f556db194168cd6e37f2d892b927" and "2c86ff58dcc003107b47f2d35aa0fdc4a3fd95e1" have entirely different histories.

2 changed files with 6 additions and 8 deletions

View file

@ -806,7 +806,6 @@ static void command(void)
exit(0); /* EOF */ exit(0); /* EOF */
#else #else
fputs(prompt, stdout); fputs(prompt, stdout);
fflush(stdout);
if (fgets(line, LBUFLEN, stdin) == 0) { if (fgets(line, LBUFLEN, stdin) == 0) {
if (feof(stdin)) { if (feof(stdin)) {
exit(0); exit(0);

View file

@ -278,16 +278,15 @@ makerequest(int request, const char *name,
struct tftphdr *tp, const char *mode) struct tftphdr *tp, const char *mode)
{ {
char *cp; char *cp;
size_t len;
tp->th_opcode = htons((u_short) request); tp->th_opcode = htons((u_short) request);
cp = (char *)&(tp->th_stuff); cp = (char *)&(tp->th_stuff);
len = strlen(name) + 1; strcpy(cp, name);
memcpy(cp, name, len); cp += strlen(name);
cp += len; *cp++ = '\0';
len = strlen(mode) + 1; strcpy(cp, mode);
memcpy(cp, mode, len); cp += strlen(mode);
cp += len; *cp++ = '\0';
return (cp - (char *)tp); return (cp - (char *)tp);
} }