summaryrefslogtreecommitdiff
path: root/src/stringmap.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert "simplify recent bug fix"Shawn Landden2019-04-141-3/+5
| | | | | | This reverts commit bbfddaa66e85913abce5f978c6b22a11d37326bc. the fd will be leaked
* simplify recent bug fixShawn Landden2019-04-141-5/+3
|
* Fix memory leaks detected by PVS-StudioOleh Kravchenko2019-04-141-3/+9
| | | | | | | | | | - climasq.c:121 The function was exited without releasing the 'buf' pointer. - argutil.c:109 The function was exited without releasing the 'b' pointer. - stringmap.c:53 The function was exited without releasing the 'result' pointer. - util.c:596 when realloc() fails in allocating memory, original pointer 'loc' is lost. Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua>
* Apply patch from Jérémie Koenig <jk@jk.fr.eu.org>:fergus.henderson2012-04-101-0/+4
| | | | | | | Fix for <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638258>: Distcc fails to build on hurd-i386 because it relies on PATH_MAX being defined.
* Ensure that all ".c" files start with "#include <config.h>".fergus.henderson2009-02-171-0/+3
| | | | | | | | | | | | | | This will hopefully fix issue 39 <http://code.google.com/p/distcc/issues/detail?id=39>. Some header files were using #if statements that depended on macros defined in config.h without #including config.h first. The result was a compilation error, because "#if !HAVE_DECL_SNPRINTF" was evaluating to true because config.h hadn't been included, causing us to declare snprintf() when we shouldn't, leading to a conflict with the declaration in the standard header files. (The alternative solution would have been to add "#include <config.h>" to every header file that uses '#if'. I decided not to do that, just for consistency with the existing code.)
* Normalize the copyright text, to the latest version of the GPLv2 textCraig Silverstein2008-05-231-10/+10
| | | | | | | | (typically the only change is in the FSF street address). Add Google copyright line in some places it was missing. Add GPLv2 notice to avahi patches. OKed by fergus
* Change C++-style // comments to /**/.Craig Silverstein2008-05-201-1/+1
| | | | | | | | | Also, fix the emacs var-setting line: it was missing a semicolon before, which means the entire line was being ignored. No contentful change. Reviewed by fergus@google.com
* Turned all tabs into 4 spaces. Got rid of whitespace at the end ofCraig Silverstein2008-05-201-109/+129
| | | | | | | | | | | | | | | | | | | | lines. Fixed up resulting mis-indented code I noticed (mostly in files that used 8 space indents, or used 4-space and 8-space indents in the same file (!)). Added the emacs tab-var setting for all files, not just some of them. I also added in copyright notices for files I noticed that didn't have them. We'll want to do another pass-through to fix these up properly, though. I used the following perl snippet to check for mis-indented code after converting tabs to whitespace: $ for i in *.{c,h}; do echo $i; perl -nle 'if ($indent > 0) {$sp=" " x $indent; /^$sp[^ ]/ && print "$.: $_"; $indent=0;}; if (/^( *).*{/ ) {$indent=length($1);} else {$indent=0;}' $i; done | less It had false positives, but hopefully didn't miss anything. Reviewed by klarlund@google.com
* Fix what appears to be a bug in the handling of DISTCC_CMDLIST.fergus.henderson2008-05-091-6/+39
| | | | | | | | | | | | | | | | | The documentation is not very clear, but distccd was documented as matching against the last DISTCC_CMDLIST_NUMWORDS words of the command, where I think by words they meant directory components. For example, if the file refered to by DISTCC_CMDLIST contains the line "/usr/bin/i686-blah-blah/gcc", and DISTCC_CMDLIST_NUMWORDS=2, only commands which end in "/i686-blah-blah/gcc" would be matched. The bug is that a command "i686-blah-blah/gcc" should be considered to match. Likewise, if DISTCC_CMDLIST contains the line "/usr/bin/gcc", and DISTCC_CMDLIST_NUMWORDS is 1 (or not set), then plain "gcc" should be allowed to match. Reviewers: Dan Kegel, Craig Silverstein
* The first step of moving everything in the distcc directory to the topCraig Silverstein2008-04-111-0/+116
level. I'm doing this in two stages, because I don't understand svn enough to be confident to do it in one. This first stage just copies all the files from distcc/FOO to FOO. Now there are two copies of each file under distcc; the Makefile/etc uses the one in distcc and ignores the one at the top level. The next commit will delete everything under distcc, and rewrite the Makefile/etc to use the top-level versions instead.