Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed, sometimes an ferror was returned when using fread, switch to f…

…gets like most other usage of popen
  • Loading branch information...
commit 795a693c4ce59ce4ea62004e98160aa9d507a5f1 1 parent c0d1de1
@davilla davilla authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 xbmc/utils/SystemInfo.cpp
View
4 xbmc/utils/SystemInfo.cpp
@@ -684,8 +684,8 @@ CStdString CSysInfo::GetUnameVersion()
FILE* pipe = popen("uname -rm", "r");
if (pipe)
{
- char buffer[256] = {'\0'};
- if (fread(buffer, sizeof(char), sizeof(buffer), pipe) > 0 && !ferror(pipe))
+ char buffer[256];
+ if (fgets(buffer, sizeof(buffer), pipe))
{
result = buffer;
#if defined(TARGET_DARWIN)
Please sign in to comment.
Something went wrong with that request. Please try again.