getsysstats problem
Andreas Jaeger
aj@suse.de
Thu Jul 6 02:25:00 GMT 2000
Hi,
I got the following warning - and a segfault in getsysstats running
the testsuite:
../sysdeps/unix/sysv/linux/getsysstats.c:48: warning: `result' might be used uninitialized in this function
We do need to initialize result with NULL. I've committed the
appended patch.
Andreas
2000-07-06 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/getsysstats.c (get_proc_path):
Initialize result.
============================================================
Index: sysdeps/unix/sysv/linux/getsysstats.c
--- sysdeps/unix/sysv/linux/getsysstats.c 2000/07/06 00:43:06 1.10
+++ sysdeps/unix/sysv/linux/getsysstats.c 2000/07/06 09:23:55
@@ -45,7 +45,7 @@
{
struct mntent mount_point;
struct mntent *entry;
- char *result;
+ char *result = NULL;
char *copy_result;
FILE *fp;
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
More information about the Libc-hacker
mailing list