mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof: fix various seek usage
This commit is contained in:
@ -220,7 +220,7 @@ get_cpu_freq (SysprofHostinfoSource *self,
|
||||
gchar buf[128];
|
||||
gssize len;
|
||||
|
||||
lseek (freq->stat_fd, SEEK_SET, 0);
|
||||
lseek (freq->stat_fd, 0, SEEK_SET);
|
||||
len = read (freq->stat_fd, buf, sizeof buf - 1);
|
||||
|
||||
if (len > 0 && len < sizeof buf)
|
||||
|
||||
@ -451,6 +451,8 @@ sysprof_symbol_map_serialize (SysprofSymbolMap *self,
|
||||
g_string_chunk_clear (self->chunk);
|
||||
g_hash_table_remove_all (self->lookasides);
|
||||
|
||||
lseek (fd, 0L, SEEK_SET);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user