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