Commit Graph

38120 Commits

Author SHA1 Message Date
Michael Lotz
951366c59d CID 10231: Remove unused fInputPort member and initilize fShutdownCount, even
though it's used only in the special case of running as BApplication.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39977 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 12:47:22 +00:00
Fredrik Holmqvist
2a74e90028 If fileDescriptor is not retrieved don't close it, and if firmwareFileSize is negative fail. CID 3493 CID CID 3494.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39976 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 12:34:16 +00:00
Fredrik Holmqvist
ec349ca3bb If there is an error opening the file (negative id) there is no need for close. CID 3474.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 11:59:34 +00:00
Fredrik Holmqvist
3c0241d8b5 While the functions didn't use the delta for i==0 accessing arrays at [0 - 1] can't be good.
CID 3197. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 11:23:40 +00:00
Fredrik Holmqvist
2f32c12f37 Delete the array after deleting the items in the array. CID 2980.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39973 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 10:46:42 +00:00
Michael Lotz
56c393e396 Cleanup, no functional change intended. Style, line length, early returns,
variable names, added TODO, variable declaration on first use, simplify some
code, add missing sanity checks...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 02:05:35 +00:00
Michael Lotz
25702ce874 * Use std::nothrow and check the bitmap/cursor allocations.
* CID 2500 and 2501: Check the BMessage::FindData() returns.
* Defensive programming: Take the bitmap/cursor BitsLength() into account when
  copying the data back.
* Some style cleanup, automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39971 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 01:19:47 +00:00
Michael Lotz
83e36298a5 CID 2977: Use the array delete operator.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39970 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 01:00:27 +00:00
Michael Lotz
174a961e22 CID 5885: Resource leak in error case.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39969 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 00:55:17 +00:00
Fredrik Holmqvist
b750229b00 Don't include sys/system.h. This avoids header recursions (the header guards kept us safe). CID 4865, CID 4894.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 22:18:30 +00:00
Fredrik Holmqvist
43687843cc Just for clarity. Renamed parameter from path to dirpath to so it's not hidden by path variable. CID 5272.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39967 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 21:17:20 +00:00
Fredrik Holmqvist
31474ccaa0 More of the same.
Postfix/prefix increment evaluation order is not changed by parantheses. Use '+ 1' for readability instead. CID 2982.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 20:47:27 +00:00
Fredrik Holmqvist
0ef0a587b6 Postfix/prefix increment evaluation order is not changed by parantheses. Use '+ 1' for readability instead. CID 2983.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 20:40:30 +00:00
Fredrik Holmqvist
e4fbd1171c Removing get_parent_node call from acpi_enumerate_child_devices.
Afaict it looks like it results in unbalanced Acquire calls on the parent. CID 10393.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39964 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 17:11:40 +00:00
Fredrik Holmqvist
b44c75c5eb Modified acpi namespace driver to match ring_buffer functions.
A bit confused about the signedness handling in ring_buffer internals though, int32 to size_t.

Unnested the acpi_namespace_read function a bit and removed dead check for negative lengths from read. CID 4093.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39963 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 16:17:54 +00:00
Joachim Seemer
ecc8da6dfe Localized missing string by applying patch by diver. Fixes #7030. Thanks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 08:38:34 +00:00
Michael Lotz
c907ee755a Undo the part of r34947 that changed the re-use check. It wasn't broken, since
the address variable is incremented in the loop above and at the end will be
equal to sNextVirtualAddress if the address space can be reused. Fixes early
boot resets due to wrongly reused virtual addresses (and them being freed while
still in use by the original user). Fixes #7026, thanks to Urias for testing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39961 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 02:15:05 +00:00
Michael Lotz
b2acbcbfb3 CID 8122, 2210 (pointing at the same), 8121 and 2209 (pointing at the same):
Taking the size of a pointer instead of the actual extended registers struct.
Not sure this is used, but if it is it made the whole fpu/sse state in the
debugger useless.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39960 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 01:44:43 +00:00
Michael Lotz
6c38786311 CID 2208 and 8119 (both pointing at the same issue): The strlcpy() was using
sizeof(char *) instead of the separately supplied textSize argument.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39959 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 01:29:46 +00:00
Michael Lotz
f3eff1ca00 Free the header after possibly accessing it when tracing is enabled. Also guard
the trace output against header being NULL (i.e. failed to map).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 00:51:05 +00:00
Michael Lotz
cd7155635d CID 8115: Fix wrong size parameter to memcmp() which lead to a broken equality
operator.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39957 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 23:49:15 +00:00
Michael Lotz
dcea2eba12 CID 2196: The sanity check did check the pointer size instead of the type size.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39956 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 23:22:43 +00:00
Michael Lotz
79dd7e57fa Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 23:16:04 +00:00
Michael Lotz
6b81e70656 * CID 2195: sizeof() was used on the buffer pointer instead of the type.
* Use strlcpy() instead of memcpy() to ensure that the dirent is properly
  terminated.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39954 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 23:07:18 +00:00
Michael Lotz
4462c768e6 CID 8076 and 2191 (both pointing out the same): Only the first sizeof(pointer)
bytes were initialized to 0 due to wrong use of sizeof().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 22:42:28 +00:00
Scott McCreary
1abf556ecf Added in missing sdl-rtf gcc4 package
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39952 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 16:14:55 +00:00
Oliver Tappe
08f914dc67 Fix CID-8112 & -8113 (strange pointer arithmetic)
* BShape:: AddShape(): drop manual multiplication in typed pointer 
  arithmetic - addding the number of elements to a typed pointer
  will already move that pointer in steps of sizeof(type). 
The effect of this bug would be overwritten memory somewhere behind the data array.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 15:50:08 +00:00
Oliver Tappe
9201344705 Fix CID-5893 (resource leak):
* close the dlopen()-ed image if the locale backend could not be created


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39950 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 15:26:58 +00:00
Oliver Tappe
4167bb128b Fix CID-34 (dead code):
* eliminate code that will never be reached

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 15:19:12 +00:00
Oliver Tappe
b97c958d25 Adjust for CID-8007:
use strlcpy() instead of strcpy() for improved clarity, although
the buffer is always wide enough [famous last words ...]

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39948 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 14:53:39 +00:00
Oliver Tappe
420e9637fe Fix CID-10224 (uninitialized member in c'tor):
* drop fShowFocus, as it is only used in a single method
* initialize fHoldValue

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 14:34:26 +00:00
Oliver Tappe
4a08647e39 Fix CID-4185 (expression can't be true):
* drop superfluous checking of uint32 < 0

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 14:25:05 +00:00
Jérôme Duval
99f77939d9 adding a LegacyDrivers namespace to avoid clash with other components (see #7018).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 14:21:36 +00:00
Oliver Tappe
e9bcfa8975 Fix CID-10211 (uninitialized member in c'tor):
* fDropIndex should be initialized

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39944 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 14:21:30 +00:00
Oliver Tappe
ce5bc205b1 * drop TODO as it doesn't apply - catalogs have nothing to do with ICU
and there are no catalog-specializations for encoding or currency

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39943 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 14:01:11 +00:00
Oliver Tappe
fc6502a69f Fix CID-10337 (unreachable code):
* only return the catalog if it isn't NULL, thus allowing the loop 
  to potentially increase the loop var - in turn making code reachable
  that wasn't before


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39942 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 13:58:57 +00:00
Joachim Seemer
82116426d6 Corrected copy-and-paste error. Fixes #7029.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 06:22:58 +00:00
Scott McCreary
15426bc2a4 Updated openssl to 1.0.0c
Updated curl to 7.21.3
Updated build of SDL to include off by 1 resolution fix by GCI student Daniel Marth, 
and the OpenGL fix by Urias McCullough



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39940 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-24 19:21:12 +00:00
Adrien Destugues
3bd54e05be Patch by Mike Roll: i18n PowerStatus. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39939 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-24 10:04:00 +00:00
Adrien Destugues
95fcf73946 Patch by Mike Roll: i18n ProcessController
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-24 09:59:07 +00:00
Adrien Destugues
0e07d4c078 Patch by Mike Roll as part of GCI: i18n LaunchBox
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-24 09:52:32 +00:00
Adrien Destugues
c9ea828200 Patch by Mike Roll as part of GCI: i18n screensaver preferences.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39936 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-24 09:42:38 +00:00
Adrien Destugues
825d265efd Patch by Mike Roll as part of GCI: Localize Time preflet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39935 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-24 09:33:21 +00:00
Marcus Overhagen
27d38ee976 Drop into debugger if the looper can't be locked.
This gets triggered randomly by net_server.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-24 02:41:08 +00:00
Michael Lotz
5377c49be4 CID 4383 and 4384: Fix wrong checks of index values against kMaxWorkspaces that
could otherwise lead to out of bound access.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-24 02:20:33 +00:00
Michael Lotz
2e3c20430a CID 4091: fTabOffset is unsigned so the < 0 comparison makes no sense.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-24 02:08:54 +00:00
Michael Lotz
95e95fee39 * CID 10247: Initialize those two members. Didn't do any harm since they depend
on a set view bitmap and are set when setting one.
* We can safe that resize_frame() call in case no view bitmap is set.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39931 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-24 01:40:36 +00:00
Michael Lotz
3b1679f9c5 * CID 8120: The size supplied to the attach call was the one of the pointer, so
the data was never correctly attached.
* CID 5886 and 5887: escapements and offsets were not freed in the error case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39930 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-24 01:13:28 +00:00
Michael Lotz
e910a0a3b7 CID 4186: The glyph_index is unsigned, so a >= 0 comparison is always true. The
"empty glyph index" as per freetype (which is eventually called) actually is 0,
so a != 0 comparison should be correct. Untested though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-24 00:58:57 +00:00
Marcus Overhagen
1550ecf11a The IN_CLASS* macros use host byte order.
This fixes netmask and broadcast ip for PXE booting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39928 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-24 00:32:19 +00:00