Commit Graph

38147 Commits

Author SHA1 Message Date
Ryan Leavengood
97d3d5a1d3 CID 9936: Uninitialized members.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40004 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-29 03:47:21 +00:00
Michael Lotz
8e164a0fe2 Add way to add a "minimal" bitmap without colorspace/flags for adding multiple
similar bitmaps.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40003 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 22:17:28 +00:00
Michael Lotz
645e9fe135 Cleanup which should've been part of r39972.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 22:12:13 +00:00
Michael Pfeiffer
05a2fec5fb * CID 9729: initialized member fPrinter in constructor.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 22:11:02 +00:00
Michael Lotz
1c3680d302 Allow creating a BitmapDrawingEngine with a specific colorspace.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40000 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 22:08:46 +00:00
Michael Pfeiffer
0f0bd984d7 * CID 6544, 5645: removed "const" qualifier on return type
as it is meaningless


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39999 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 22:08:04 +00:00
François Revol
b44f0a94a4 Add commented setting to enable the laplink type debugging output module.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39998 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 22:01:19 +00:00
François Revol
3d5a11ee4e 44100 kHz seems a lot for audio sampling rate...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39997 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 21:51:33 +00:00
Michael Pfeiffer
9dbc17e4f3 * CID 10346: hid unused code; I cannot remember why the
code is not used; maybe it was not implemented completly
  or BePDF could not render it correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39996 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 21:44:59 +00:00
Michael Pfeiffer
737e45854e * As pointed out by Rene the buffer size in snprintf
includes the 0-terminator.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39995 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 21:24:58 +00:00
Michael Pfeiffer
fdee209b00 * CID 10260: member variable fIconSize was not initialized
in error case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39994 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 21:14:25 +00:00
Michael Pfeiffer
a17b8132ed * CID 10260: member variable fDefaultPrinter was not
initialized in constructor in error case


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39993 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 21:12:17 +00:00
Michael Pfeiffer
e923359460 * CID 7969: defensive programming: use snprintf instead of sprintf.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39992 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 21:06:29 +00:00
Michael Pfeiffer
0f73490879 * CID 5322: renamed parameter to "transportPath" to
not hide parameter "path".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39991 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 20:53:11 +00:00
Michael Pfeiffer
1f8d90053a * CID7947 avoid buffer overflow (very unlikely;
should have happened only if the translated text was very large).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 20:49:01 +00:00
Michael Lotz
2baa527f82 CID 3221: Add missing break.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39989 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 19:08:37 +00:00
Michael Lotz
2d5c8bdea3 CID 10552: Fix double free in error case.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39988 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 18:55:00 +00:00
Fredrik Holmqvist
7f83c5cd84 No need to use loadAddress as delta as delta isn't used for i==0. CID3197, CID 1972 and ticket #6990.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39987 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 17:04:58 +00:00
Michael Lotz
5c3457dd22 CID 7961: Use snprintf with proper sizes to make sure nothing overflows.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39986 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 16:52:29 +00:00
Michael Lotz
edcbc5b0e3 CID 5889: The bytes array was leaked.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39985 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 16:44:24 +00:00
Michael Lotz
5327be44ec Remove unused members. Also resolves CID 10230 that complained about them not
being initialized.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 16:22:29 +00:00
Michael Lotz
aa8219391f Someone forgot to initialize fUpdate15 and fColor15 when adding 15bit color
support some 7 years ago...
CID 10246, 10245, 10244, 9471, 9454 and 9453 all concerning that (in the
different constructors / assignements).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39983 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 15:59:07 +00:00
Fredrik Holmqvist
14a12acc76 Only close device if it's a valid fd. CID 3466.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39982 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 15:55:57 +00:00
Stefano Ceccherini
b2f1b918ed empty the message before reusing it, otherwise the pictures will be archived multiple times. Should fix ticket #7035.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39981 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 13:05:23 +00:00
Michael Lotz
8e165582f1 CID 10229: fDraggingMessage was not initialized, potentially sending out drag
messages where there shouldn't have been any.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39980 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 13:04:43 +00:00
Michael Lotz
d65593aaa3 CID 1420: fTargetScreen was leaked.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39979 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 12:59:14 +00:00
Michael Lotz
673481f371 CID 2502: Check the FindMessage return which also safes a needless FindRect call
in the error case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39978 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 12:55:19 +00:00
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