Commit Graph

41507 Commits

Author SHA1 Message Date
Philippe Saint-Pierre
f8464b965d dp83815 network driver: replace sprintf by snprintf, code style 2011-12-30 21:57:00 -05:00
Philippe Saint-Pierre
a42c52c07e devfs: Fix memory leak
Following r25662 (where devfs was migrated to the new driver architecture),
the issue noted in CID 872 and already fixed in r25643 was reintroduced.
2011-12-30 20:50:48 -05:00
Philippe Saint-Pierre
fbbed9473f AC97 driver: replace some usage of strcpy() by strlcpy()
CID 8921, CID 8920, CID 8919, CID 8922.  Also fixes some coding
style issues.
2011-12-30 00:08:00 -05:00
Philippe Saint-Pierre
c7199625ef Marvell Wifi driver: NULL check before dereferencing
CID 5911.
2011-12-29 23:27:44 -05:00
Philippe Saint-Pierre
258c1019f1 usb_disk: avoid to use variables after having been free'd()
CID 10543
2011-12-29 22:58:52 -05:00
Philippe Saint-Pierre
eb94592703 acpi_manager: Uninit var returned in EcRead()
In case of failure in EcRead(), rather than returning the proper status,
an uninit variable was returned. CID 11145.
2011-12-29 17:37:58 -05:00
Philippe Saint-Pierre
5e783d6ad7 libgutenprint: channel.c: Defer assigment after NULL check
To avoid hypothetical NULL dereference. CID 10821, CID 10822

(patch sent upstream)
2011-12-29 15:51:38 -05:00
Philippe Saint-Pierre
3ad5b0818e ATA bus_manager: return value (signed) put in unsigned variable
This might have been occulting an eventual error code.

CID 4095.
2011-12-29 14:54:47 -05:00
Philippe Saint-Pierre
91a7326a04 Fix wrong order of arguments in memset()
CID 4119.
2011-12-29 14:29:43 -05:00
Philippe Saint-Pierre
d2a423e499 driver_settings: Replace type of bufferSize from size_t to ssize_t
At various locations, checks are made so that bufferSize is >= 0, which never
occurs. CID 4197.
2011-12-29 14:08:15 -05:00
Philippe Saint-Pierre
b6e4d1a9dc BufferedDataIO::Flush(), use ssize_t rather than size_t
Write() was returing an ssize_t and Flush() was expecting a ssize_t,
but a size_t was instead used. CID 11052.
2011-12-29 13:43:15 -05:00
Fredrik Holmqvist
79423142ff Stylefixes as pointed out by Axel and some minor changes possible in cpp.
No functional change.
2011-12-29 18:59:00 +01:00
Philippe Saint-Pierre
114ab70975 Change style of boolean expression to enhance readability. 2011-12-29 12:40:32 -05:00
Fredrik Holmqvist
87dfde44f7 Stop using glibc's asm strlen and use our own.
Mostly done because olta want less dependency on glibc.
It should also make porting a tiny bit simpler.

Testresults, mean values on Haiku from libMicro:
 * with glibc: strlen_10: 0.03859S, strlen_1k: 1.67075S.
 * with strlen.cpp: strlen_10: 0.03854S, strlen_1k: 1.66938S.

So at least on my machine it's possible to beat glibc ;)
2011-12-29 17:41:03 +01:00
Fredrik Holmqvist
55cf69968f Rename strlen.c strnlen.c to strlen.cpp strnlen.cpp.
No changes in the files themselves in this commit.
2011-12-29 15:43:23 +01:00
Alex Wilson
981c729bdc Fix potential uninitialized variable bug in BLayout::AllUnarchived().
BMessage::GetInfo() doesn't set the count output var in error cases.
2011-12-28 22:57:20 -07:00
Alex Wilson
9f0292314d Fix typo in BLayout::AllArchived().
BLayout::AllArchived() was forwarding to BArchivable, skipping BLayoutItem.
2011-12-28 22:37:59 -07:00
Alex Wilson
f1e81e6172 Fix bug in BLayout::RemoveView().
Fix typo-induced bug causing (in many cases) the wrong item to be removed from the layout!
Also, improve performance from O(n * m) to O(n), although n and m will always be quite small in practice, we might as well.
2011-12-28 22:29:58 -07:00
Alexander von Gluck IV
2cb6157746 Add Juniper LE+XT pci id's 2011-12-28 17:15:45 -06:00
Philippe Saint-Pierre
0fa5c8f528 Constant expression result
Usage of | rather than & to check a binary mask.  CID 11031.
2011-12-27 23:27:20 -05:00
Urias McCullough
baadc350b5 Fix ASSERT that wasn't altered back in hrev39770, allows debug build to succeed
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2011-12-27 23:05:56 -05:00
Urias McCullough
2aef344ad2 Fix another mouse preference issue specific to gcc4 debug build
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2011-12-27 22:58:39 -05:00
Urias McCullough
ae2107f878 Fix PDF print driver debug code
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2011-12-27 22:58:28 -05:00
Urias McCullough
1bd15897ba Fix various issues in cortex debug code
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2011-12-27 22:58:19 -05:00
Urias McCullough
b6c526d2d9 Fix bad debug print in canna
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2011-12-27 22:58:04 -05:00
Urias McCullough
e409420486 Fix warning in BSnow debug code
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2011-12-27 22:57:53 -05:00
Urias McCullough
94624a8ad6 Fix warning in AutoMounter debug code
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2011-12-27 22:57:44 -05:00
Urias McCullough
c8a07c9f56 Fix implicit void* cast in usb_midi debug code
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2011-12-27 22:57:17 -05:00
Oliver Tappe
3d438b9605 Fix collation-related part of locale_test.
* don't try to compute the size of an array passed in as parameter,
  but use end markers instead
* use fr_CA instead of fr_FR when testing reverse collation of secondary
  differences (fr_FR doesn't do that by default anymore)
2011-12-27 23:34:08 +01:00
Oliver Tappe
9cb0187a4f Adjust locale_test expectations to current ICU-data. 2011-12-27 14:16:16 +01:00
Oliver Tappe
d68d73f7a6 Improve timezone names returned by BTimeZone.
* Use TimeZone::SHORT specifier instead of SHORT_COMMONLY_USED, since
  the former yields more appropriate (textual) values. Strangely enough,
  it used to be the other way around, which is why we didn't used SHORT
  in the past.
2011-12-27 14:15:21 +01:00
Oliver Tappe
f4995c1381 Improve timezone names returned by POSIX functions.
* Use TimeZone::SHORT specifier instead of SHORT_COMMONLY_USED, since
  the former yields more appropriate (textual) values. Strangely enough,
  it used to be the other way around, which is why we didn't used SHORT
  in the past.
2011-12-27 14:14:55 +01:00
Matt Madia
83cbfa5e0e Rebuilt BeZillaBrowser for gcc4. 2011-12-26 23:02:48 -05:00
Matt Madia
dc5a18ba3f Update ReadMe for the newer jam version. 2011-12-26 16:15:03 -05:00
Matt Madia
d5b5b51e6c Updated the jam packages to 2011-12-22 2011-12-26 16:04:15 -05:00
Matt Madia
81275d20c7 Utilize JAMJOBS (jam 2.5-haiku-20111222) in InvokeSubJam.
Note:
As InvokeSubJam invokes a jam process separate from the first, JAMJOBS may
result in up to 2 * n - 1 jobs in total being run. While this is not accurate,
it is a better scenario than only a single job running.
2011-12-26 14:05:18 -05:00
Fredrik Holmqvist
7928259c69 Style fixes. No functional changes.
* Parameter renamed from s to string.
 * HasZeroByte renamed to LACKS_ZERO_BYTE and the check is inverted.
 * Removed space between cast and variable.
2011-12-26 18:24:22 +01:00
Fredrik Holmqvist
11048d3619 Reworked strlen and strnlen to follow style guide.
Fix problems pointed out by Marcus.
2011-12-25 17:00:31 +01:00
Fredrik Holmqvist
753a02c156 Reworked strlen and strnlen to look at four bytes at the time. From what I understand this should be safe.
Based on info from bit twiddling hacks: http://graphics.stanford.edu/~seander/bithacks.html
2011-12-24 22:27:44 +01:00
Siarzhuk Zharski
6ef455e4a2 Added AX88772A/B harwdare support
* Synchronized with FreeBSD driver - added support for AX88772A and
  AX88772B chipsets;
* Some new hardware ids added;
* Fixed devices lookup routine.
2011-12-24 20:09:10 +00:00
Niels Sascha Reedijk
87ab70a3e2 Update translations from Pootle and also really remove zh_hans.catkeys. 2011-12-24 11:35:56 +01:00
Joseph R. Prostko
68fe8a9edc * Update KeymapSwitcher and Vim optional packages 2011-12-23 18:20:08 -05:00
Niels Sascha Reedijk
8e751ae341 Rename zh_hans to zh-Hans.
We keep the underscore to help with fallback languages. So in that respect pt_BR
falls back to pt in case of untranslated strings. zh-Hans is a way of writing
Chinese, as is zh-Hant. Neither of them can or should fall back on a
(non-existent) zh language code. They can be combined to form zh-Hans_CN and
zh-Hans_TW if there are ever translators that want to further refine that
dialect.
2011-12-23 22:39:56 +01:00
François Revol
781fd13550 Style fixes. 2011-12-23 17:08:03 +01:00
François Revol
a90b9b0221 Guard against buggy PCI bridges
* panic on pci controller init failure. No reason to continue just to crash later on.
* guard against buggy or misconfigured bridges (like the VIA Apollo MVP3 in my K6-2)
by limiting the recursion depth in FixupDevices and DiscoverBus.
2011-12-23 16:58:58 +01:00
François Revol
78ce5eb732 Add a pci:mechanism driver setting
* This should be use to force a config mechanism in case another one crashes.
* Actually doesn't seem to catch the setting passed by the boot_loader,
maybe it should be pci_config_mechanism in safemode instead ?
* Added a TODO about respecting the "don't call the BIOS" setting.
2011-12-23 13:55:23 +01:00
Urias McCullough
323738f8ab Fix copy/paste error in mouse preferences so it will compile with DEBUG=1
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2011-12-22 20:33:02 +00:00
Aleksas Pantechovskis
d38ae623c3 Textencoding Kit localization support added.
* Textencoding Kit now uses localized names of available encodings;
* Default encoding for composing new messages in Mail application is now
  configurable through localization feature. Fixes #8147.
* This contribution was made as part of GCI 2011 task.

Signed-off-by: Siarzhuk Zharski <zharik@gmx.li>
2011-12-22 23:10:32 +00:00
Axel Dörfler
82a05afe30 Made the SRT parser a bit less strict.
* This allows to parse some SRTs that previously failed.
* Use the more expressive BString::IsEmpty() instead of Length() > 0.
2011-12-22 22:25:06 +01:00
Alex Wilson
61084e53b5 Remove clamping in new BSplitLayout methods.
Since clamping the index for these methods could lead to confusing side effects, we'll just avoid the clamping, and let things segfault when the programmer goes out of bounds.

Closes #7902
2011-12-22 14:16:44 -07:00