Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
3349
Browse files Browse the repository at this point in the history
Fix a warning on some compilers.
  • Loading branch information
akkartik committed Sep 14, 2016
1 parent 0fb8f78 commit 9a1d39b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions 091socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,15 @@ case _READ_FROM_SOCKET: {
}
:(before "End Primitive Recipe Implementations")
case _READ_FROM_SOCKET: {
products.resize(1);
double socket_fd = ingredients.at(0).at(0);
char single_char[2];
bzero(single_char, 2);
read(socket_fd, single_char, 1);
products.resize(1);
if (read(socket_fd, single_char, 1) < 0) {
raise << maybe(current_recipe_name()) << "read from socket failed\n" << end();
products.at(0).push_back(0);
break;
}
products.at(0).push_back(single_char[0]);
break;
}
Expand Down

0 comments on commit 9a1d39b

Please sign in to comment.