summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-08-08 22:38:43 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-08-08 22:39:50 -0500
commit19858da361751396cc5538464d9a9efdaced0739 (patch)
treea0c6320392166c22e58c248cecdb57ceb73d5da0 /src
parentb8addb4af3b1b9fbd02c59aafe953dabac8887ec (diff)
downloadofono-19858da361751396cc5538464d9a9efdaced0739.tar.bz2
Fix compile warning
Diffstat (limited to 'src')
-rw-r--r--src/sim.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sim.c b/src/sim.c
index 1271dedb..49422e4f 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -792,7 +792,9 @@ static gboolean sim_op_check_cached(struct ofono_modem *modem)
buffer = g_malloc(file_length);
- if (TFR(read(fd, buffer, file_length)) < file_length)
+ len = TFR(read(fd, buffer, file_length));
+
+ if (len < (ssize_t)file_length)
goto cleanup;
for (record = 0; record < file_length / record_length; record++) {