diff options
author | Mathias Gumz <akira@fluxbox.org> | 2015-01-16 09:52:00 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2015-01-16 09:52:00 (GMT) |
commit | 772ec145952bfddc7888504f22859df1f24f8d5e (patch) | |
tree | 58356cf14f52792db6fda3c482a5b9865f711e56 /src/main.cc | |
parent | e37cad714c77b24e4421f5dc1b3d01fe685b637a (diff) | |
download | fluxbox-772ec145952bfddc7888504f22859df1f24f8d5e.zip fluxbox-772ec145952bfddc7888504f22859df1f24f8d5e.tar.bz2 |
Fix uninitialized variables; cosmetics
Note: I expect only modern compilers will hit the source of fluxbox. It
seems futile to guard stdlib headers while demanding <algorithm> etc. This
should trim down the noise in the source quite a bit.
Diffstat (limited to 'src/main.cc')
-rw-r--r-- | src/main.cc | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/main.cc b/src/main.cc index 92d04ce..66a5adb 100644 --- a/src/main.cc +++ b/src/main.cc | |||
@@ -33,20 +33,8 @@ | |||
33 | #define _GNU_SOURCE | 33 | #define _GNU_SOURCE |
34 | #endif // _GNU_SOURCE | 34 | #endif // _GNU_SOURCE |
35 | 35 | ||
36 | #ifdef HAVE_CSTDLIB | ||
37 | #include <cstdlib> | ||
38 | #else | ||
39 | #include <stdlib.h> | ||
40 | #endif | ||
41 | |||
42 | #ifdef HAVE_CSTRING | ||
43 | #include <cstring> | ||
44 | #else | ||
45 | #include <string.h> | ||
46 | #endif | ||
47 | |||
48 | #ifdef HAVE_UNISTD_H | 36 | #ifdef HAVE_UNISTD_H |
49 | #include <unistd.h> | 37 | #include <unistd.h> |
50 | #endif | 38 | #endif |
51 | 39 | ||
52 | #ifdef HAVE_SYS_WAIT_H | 40 | #ifdef HAVE_SYS_WAIT_H |
@@ -58,6 +46,8 @@ | |||
58 | #endif | 46 | #endif |
59 | 47 | ||
60 | 48 | ||
49 | #include <cstdlib> | ||
50 | #include <cstring> | ||
61 | #include <iostream> | 51 | #include <iostream> |
62 | #include <stdexcept> | 52 | #include <stdexcept> |
63 | #include <typeinfo> | 53 | #include <typeinfo> |
@@ -290,9 +280,9 @@ int main(int argc, char **argv) { | |||
290 | execvp(argv[0], argv); | 280 | execvp(argv[0], argv); |
291 | perror(argv[0]); | 281 | perror(argv[0]); |
292 | 282 | ||
293 | const char *basename = FbTk::StringUtil::basename(argv[0]).c_str(); | 283 | const std::string basename = FbTk::StringUtil::basename(argv[0]); |
294 | execvp(basename, argv); | 284 | execvp(basename.c_str(), argv); |
295 | perror(basename); | 285 | perror(basename.c_str()); |
296 | } | 286 | } |
297 | 287 | ||
298 | return exitcode; | 288 | return exitcode; |