Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.2:Update
splashy
splashy-0.3.8-fix-compiler-warnings.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File splashy-0.3.8-fix-compiler-warnings.patch of Package splashy
Index: src/splashy_functions.c =================================================================== --- src/splashy_functions.c.orig +++ src/splashy_functions.c @@ -214,14 +214,22 @@ search_pattern (const gchar * perr_patte buffer = g_try_malloc (max_buf); if (buffer && (fp = g_fopen (filename, "r"))) { - fread_unlocked (buffer, max_buf, 1, fp); /* *_unlocked - * are a GNU - * extension: - * makes - * function - * fread() - * thread - * safe (to use, but with care) */ + /* *_unlocked + * are a GNU + * extension: + * makes + * function + * fread() + * thread + * safe */ + if (fread_unlocked (buffer, max_buf, 1, fp) == 0) { + ERROR_PRINT ("Cannot read from file %s\n", filename); + fclose (fp); + if (buffer) + g_free (buffer); + return FALSE; + } + fclose (fp); buffer[max_buf - 1] = '\0'; ret = search_pattern (perr_pattern, buffer, use_ignore); @@ -422,8 +430,15 @@ cmd_chroot (void **args) return 1; } - chdir (dir); - chroot (dir); + if (chdir (dir) == -1) { + ERROR_PRINT ("Cannot chroot to non existing directory %s\n", dir); + return 1; + } + + if (chroot (dir) == -1) { + ERROR_PRINT ("Cannot chroot to non existing directory %s\n", dir); + return 1; + } return 0; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor