Commit Graph

60403 Commits

Author SHA1 Message Date
Murai Takashi
319c399d61 PVS V739: EOF compared with a value of the char type.
Change-Id: Icfaff590359381fbdd3bbd7993dab92111da3ed1
Reviewed-on: https://review.haiku-os.org/c/1618
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-21 15:47:48 +00:00
Adrien Destugues
194c483884 Move SettingsHandler to libshared
It's used by both Tracker and Codycam and others might find it useful.

Change-Id: I585d3a1bdc7f8fce7d36bedf6867464cd541ba2e
Reviewed-on: https://review.haiku-os.org/c/1637
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-21 15:47:48 +00:00
Autocomitter
d63cb7c8db Update translations from Pootle 2019-07-21 08:11:11 +00:00
Calvin Buckley
f093894af1 Fix Zen-based (family 0x8f) CPU naming
Previously, it identified all Zen CPUs as Ryzen 7. Since the model
and stepping information consist of microarchitecture information
and don't carry the model number, use the parse_amd based name,
which will remove any unnecessary details from the returned name.

Fixes #15153.

Change-Id: I1a20bf35a60b2fdd20d4cc90ec2dd95fd0e6439d
Reviewed-on: https://review.haiku-os.org/c/1634
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-20 16:07:58 +00:00
CodeforEvolution
e1a822a95f Conform putenv to POSIX standards
Discovered this while working on VLC, checked with other online sources too.

Change-Id: I114c20babda0ff0e90d0eeee299d8483700166bd
Reviewed-on: https://review.haiku-os.org/c/1628
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-07-20 16:02:00 +00:00
Augustin Cavalier
736adc5a11 XHCI: Tweak formatting of FinishTransfers logic.
No functional change intended.
2019-07-20 09:52:14 -04:00
Augustin Cavalier
2f044f2aa7 XHCI: Check return status of PrepareKernelAccess.
Potentially fixes #15172.
2019-07-19 21:07:29 -04:00
Augustin Cavalier
a04ff4c767 kernel/fs: Fix copy/paste error. 2019-07-19 20:49:56 -04:00
Augustin Cavalier
62f06d8612 kernel/fs: Use an object_cache for the file_descriptor structs.
file_descriptor structs were (following the original packagefs changes)
the 4th most allocated item during the boot, with 11903 instances.
These are of course all rather ephemeral, as after the boot finished
there were only 70-some-odd remaining (which is surprisingly low,
I though.)

During heavy system use, this will of course get hit much more often.
So making them object_cached for both performance and memory reasons
makes a lot of sense.
2019-07-18 20:47:44 -04:00
Augustin Cavalier
1f39d6dd11 arch_user_debugger: Restore the use of size_t for dr7.
The prior change broke the build with some cryptic "invalid
instruction mov" messages. So it must have been correct before.
2019-07-18 20:36:13 -04:00
Zoltán Mizsei
c6fd6cbba4 Import link.h and link_elf.h from FreeBSD master
Add _D_BSD_SOURCE guarding
Change-Id: I6eefe207b5e7e645cd3aec3b1981aae59793fa98
Reviewed-on: https://review.haiku-os.org/c/1620
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-07-17 22:17:49 +00:00
Adrien Destugues
1602e35c4c PVS V774: use after free
Change-Id: I96267456623389e66f003bef94246c7d58a2c23d
Reviewed-on: https://review.haiku-os.org/c/1626
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-17 22:17:22 +00:00
Adrien Destugues
a216132469 PVS V784: fix size of DR7 register
Even on 64bit CPUs it's a 32bit register.

Change-Id: I9a4de6eec225de19a90d70fae1382b662e530629
Reviewed-on: https://review.haiku-os.org/c/1625
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-17 22:17:22 +00:00
Adrien Destugues
4a113a01d0 PVS V792: use short circuit operators
Avoids calling all the functions, we can stop once one of them is true.

Change-Id: I92437a60d3d52efd5a11547a11b88e3bf232e66b
Reviewed-on: https://review.haiku-os.org/c/1624
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-17 22:17:22 +00:00
Adrien Destugues
72bfb14432 PVS V1028: cast result of operation instead of operands
If an overflow occurs before the cast, we can't fix it. If we cast
first, we can rely on integer promotion to make the result use the
appropriate size.

Change-Id: I7462e28422456c07f179f94d39c10c408d9bec36
Reviewed-on: https://review.haiku-os.org/c/1623
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-17 22:17:22 +00:00
Adrien Destugues
fbe53d9249 PVS V1031: missing includes for memcpy/memset
Change-Id: I106027c0b8a367be1e58598f124e3a6d6541ee32
Reviewed-on: https://review.haiku-os.org/c/1622
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-17 22:17:22 +00:00
Adrien Destugues
79d1ca0fa9 PVS V564: use of bitwise operators on booleans
Change-Id: I0a0cd7ddba0abaef27700f1ba05bf99bb8c7a400
Reviewed-on: https://review.haiku-os.org/c/1607
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-17 22:11:40 +00:00
Murai Takashi
e081b9cd7e PVS V611: Use delete [] for memory allocated by new [].
Change-Id: I712350ae7f742aaa8e0ea58186265fac4bbac73e
Reviewed-on: https://review.haiku-os.org/c/1627
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-17 22:09:10 +00:00
Adrien Destugues
ff38df48cf PVS V568: strange uses of sizeof
Change-Id: I4c4e0395f579cf3b5ec4db2c30bbe2dc2d866de7
Reviewed-on: https://review.haiku-os.org/c/1608
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-17 01:58:27 +00:00
Adrien Destugues
994c85678d PVS V603: useless creation of objects
Change-Id: Ia40d26a9a5c1f4b3383b05f94eb8220fbb36583d
Reviewed-on: https://review.haiku-os.org/c/1615
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-17 01:57:50 +00:00
Adrien Destugues
0c5f4fb751 PVS V595: use before null-check
Change-Id: I1e74b376d77686c08778882b6f2c4c67a51b6eb3
Reviewed-on: https://review.haiku-os.org/c/1614
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-17 01:57:50 +00:00
Adrien Destugues
6cc8d65e9e PVS V593: missing parentheses
Change-Id: I717b13ebf9b5e2436842cfadab757187529567f2
Reviewed-on: https://review.haiku-os.org/c/1613
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-17 01:57:50 +00:00
Adrien Destugues
22817d221a PVS V591: non void functions must return something
Change-Id: I1f4276bc32afab75cf857c143d2bdb4fc3b578b1
Reviewed-on: https://review.haiku-os.org/c/1612
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-17 01:57:50 +00:00
Adrien Destugues
d1a703cb22 PVS V579: strange size used for memset
Change-Id: I217e0b4232ec78bbcd651a361fc766b5944d7d7c
Reviewed-on: https://review.haiku-os.org/c/1611
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-17 01:57:50 +00:00
Adrien Destugues
4a1d8b1afb PVS V575: strange values passed to well known functions
Change-Id: Id6008d93777f860d0b341bcd012fe6f86c99cf35
Reviewed-on: https://review.haiku-os.org/c/1610
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-17 01:57:50 +00:00
Adrien Destugues
bec70b1ec8 Remove useless use of BytePointer
Change-Id: Ic813057de9575b2ec26850d9432746f904927875
Reviewed-on: https://review.haiku-os.org/c/1606
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-17 01:48:25 +00:00
Adrien Destugues
12d046d024 PVS V547: always false conditions
Change-Id: I389c081331b1c5ef67bef9ffcac9055573e1ebf5
Reviewed-on: https://review.haiku-os.org/c/1605
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-17 01:48:25 +00:00
Adrien Destugues
cbda783eaa PVS V570: variables assigned to themselves
Change-Id: Ia6c4af6a18be28c59dd0e5f0ceab75602c538b10
Reviewed-on: https://review.haiku-os.org/c/1609
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-17 01:46:23 +00:00
Adrien Destugues
fcf7cbe79e PVS V522: null pointer dereferences
Change-Id: Iaa753ef3a93c36031789a85f87e569fc410d3304
Reviewed-on: https://review.haiku-os.org/c/1604
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-16 20:44:32 +00:00
Adrien Destugues
439ca67c06 PVS V519: setting the same variable twice
Change-Id: I3967f1c77c89d1aa9d040d8ff7a8593daca8f8b2
Reviewed-on: https://review.haiku-os.org/c/1603
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-16 20:38:57 +00:00
Adrien Destugues
ca72c6784d PVS V517: two times the same comparison
Change-Id: I93bfdb8cb09d61f537228c4b0a53ee603240d00d
Reviewed-on: https://review.haiku-os.org/c/1602
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-16 20:37:25 +00:00
Adrien Destugues
a6dcaa68a9 PVS V507: pointer to stack leaked to global variable
Change-Id: I56740f4b847c0b99a44e7db830bcccb20bf51cbc
Reviewed-on: https://review.haiku-os.org/c/1601
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-16 20:36:48 +00:00
Adrien Destugues
1ec8732c71 PVS V506: using pointer to deallocated stack space
Change-Id: I43f7d0208f7d644d6f4274a9a718773f7a1346a0
Reviewed-on: https://review.haiku-os.org/c/1600
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-16 20:35:56 +00:00
Adrien Destugues
11cba1646d PVS V502: missing parentheses around ternary operator
Change-Id: If3179e7b0a583f64e2d690a2f62526bd527e2964
Reviewed-on: https://review.haiku-os.org/c/1599
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-16 20:34:12 +00:00
Adrien Destugues
16d463ae1d PVS V501: redundant checks
There are some more in telnetd and agg but I'm not sure if they are
intentional, the code is so ugly there.

Change-Id: I9cc2bf8a919c3b1d6c68f2ded8622730497b0f91
Reviewed-on: https://review.haiku-os.org/c/1598
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-16 20:33:24 +00:00
Humdinger
583c561cb2 Button labels: "Ok" -> "OK"
All caps is our standard.
2019-07-16 20:26:45 +02:00
brjhaiku
ef52a3d48f btrfs: document DirectoryIterator class (no functional change)
Change-Id: Iffbd7112a9a266b65d6dd56dbd040f04e5ab58b2
Reviewed-on: https://review.haiku-os.org/c/1493
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-07-16 11:32:13 +00:00
Augustin Cavalier
72ab11b563 userlandfs: libbsd.so is referenced as "libbsd.so".
Fixes the build.
2019-07-16 00:30:21 -04:00
Augustin Cavalier
956664faec usb_audio: Cancel transfers when stopping the stream and do not queue more.
Seems to fix some KDLs caused at lower layers in the stack.
2019-07-16 00:29:02 -04:00
Augustin Cavalier
aefe4850cd USB: Rework the device speed detection code.
This is more in line with how OpenBSD and FreeBSD do this detection;
and should provide at least some support for USB 3.0+ hubs.

Potentially helps with #15001.

Change-Id: I313400b790b52fbca490c9fc8b721bedb97a64f9
2019-07-16 00:29:02 -04:00
Adrien Destugues
85965aba7a PVS-645: invalid/dangerous use of strncat.
Just don't use strncat.

Change-Id: I17efce87cf2ca7f621f98fb0c6679f48f631e98b
Reviewed-on: https://review.haiku-os.org/c/1595
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-16 00:26:41 +00:00
Adrien Destugues
0df9e45c20 Use explicit_bzero where it makes sense
PVS studio new report, warning type V597

Change-Id: Icd85aadf3ffc587806f9a24d224d0a369d4ce0e0
Reviewed-on: https://review.haiku-os.org/c/1594
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-16 00:26:41 +00:00
Humdinger
729709ba87 HaikuDepot: Improved translatability using BStringFormat
The string "(%count% more to download)" is sensitive to
different plural forms in other languages. For example, in
German one could have:
	"1 weiterer Download" and
	"12 weitere Downloads"

Change-Id: I3ab98cca6ae5066f7558e9ce22c97b6c37ec4a9c
Reviewed-on: https://review.haiku-os.org/c/1593
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-16 00:25:53 +00:00
Autocomitter
c383ef3240 Update translations from Pootle 2019-07-15 01:02:37 +00:00
Augustin Cavalier
d5aa7f00a2 usb_audio: Stop before reallocating buffers and add more error checks.
Also print strerror() for SetGlobalFormat.
2019-07-14 16:31:02 -04:00
Augustin Cavalier
553ff67585 XHCI: Print errors when transfers have non-success completion codes. 2019-07-14 14:37:00 -04:00
Augustin Cavalier
9cd2907d68 XHCI: Trace an error when we receive command events for unknown commands.
This revealed that StopEndpoint commands on QEMU were returning ...
after the semaphore timeout was already hit. Now to figure out
why that is the case...
2019-07-14 14:31:07 -04:00
Augustin Cavalier
60f15f5aa2 XHCI: Turn failure to stop the endpoint into a TRACE_ERROR. 2019-07-14 14:28:24 -04:00
Augustin Cavalier
c8375b0017 XHCI: Tweak priorities a bit more.
Put the EventThread as URGENT_PRIORITY and the downstream FinishThread
as URGENT - 1. Hopefully this will serve as a better hint to the
scheduler as to what we want to occur here.
2019-07-14 14:27:30 -04:00
Kacper Kasper
17c9e98743 TextView: add shortcuts for wordwise delete
Change-Id: Ie67f6255c3f5d9d8ccc6699ed42dd71ae593fa16
Reviewed-on: https://review.haiku-os.org/c/1573
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-07-14 14:14:39 +00:00