diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-02-02 17:00:47 +0100 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-02-02 17:00:47 +0100 |
commit | f275ef20ccebd13b52dda044294068ef4de2f5cd (patch) | |
tree | 1f67aad1f51c8ae38032b70a708babe6c057fbae | |
parent | 6b6b73806f0c59f322ee1797a92749c2b4136294 (diff) | |
parent | e9107ed5c99a1628a733d597395d620d1f062023 (diff) | |
download | abrt-f275ef20ccebd13b52dda044294068ef4de2f5cd.tar.gz abrt-f275ef20ccebd13b52dda044294068ef4de2f5cd.tar.xz abrt-f275ef20ccebd13b52dda044294068ef4de2f5cd.zip |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
-rw-r--r-- | lib/Plugins/CCpp.cpp | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp index b0c5a758..0957b395 100644 --- a/lib/Plugins/CCpp.cpp +++ b/lib/Plugins/CCpp.cpp @@ -752,26 +752,6 @@ void CAnalyzerCCpp::CreateReport(const char *pDebugDumpDir, int force) */ #ifdef HOSTILE_KERNEL #define CORE_SIZE_PATTERN "Max core file size=1:unlimited" -static char *skip_whitespace(char *str) -{ - while (*str) { - if (*str != ' ' && *str != '\t') - return str; - str++; - } - return str; -} - -static char *skip_non_whitespace(char *str) -{ - while (*str) { - if (*str == ' ' || *str == '\t') - return str; - str++; - } - return str; -} - static int isdigit_str(char *str) { do { @@ -785,7 +765,7 @@ static int set_limits() { DIR *dir = opendir("/proc"); if (!dir) { - /* this shouldn't fail, but to be safe.. */ + /* this shouldn't fail, but to be safe.. */ return 1; } @@ -814,7 +794,7 @@ static int set_limits() } fclose(limits_fp); if (!ulimit_c || ulimit_c[0] != '0' || ulimit_c[1] != '\0') { - /*process has nonzero ulimit -c, so need to modify it*/ + /*process has nonzero ulimit -c, so need to modify it*/ return 0; } /* echo -n 'Max core file size=1:unlimited' >/proc/PID/limits */ @@ -823,8 +803,8 @@ static int set_limits() errno = 0; /*full_*/ ssize_t n = write(fd, CORE_SIZE_PATTERN, sizeof(CORE_SIZE_PATTERN)-1); - if(n < sizeof(CORE_SIZE_PATTERN)-1) - log("warning: can't write limit to: %s", limits_name); + if (n < sizeof(CORE_SIZE_PATTERN)-1) + log("warning: can't write limit to: %s", limits_name); close(fd); } else @@ -836,10 +816,11 @@ static int set_limits() return 1; } } - return 0; + closedir(dir); + return 0; } - #endif /* HOSTILE_KERNEL */ + void CAnalyzerCCpp::Init() { ifstream fInCorePattern; |