hrev49349 adds 3 changesets to branch 'master'
old head: 93bd491fb75dd3b0d83d3fe99bc1ecfc8ad07934
new head: 494fe5a431e984444293be8469d0d96bd0303574
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=494fe5a431e9+%5E93bd491fb75d
----------------------------------------------------------------------------
ee056a089cd9: match new[] operator with delete[] operator
The string ends up being deleted with the [] variant later on.
CID 602975.
f4a699af83d6: CID 1273539: Use right variable in construction check
494fe5a431e9: CID 1273484: Use bitwise operator to verify bitmask
[ Philippe Saint-Pierre <stpere@xxxxxxxxx> ]
----------------------------------------------------------------------------
3 files changed, 3 insertions(+), 3 deletions(-)
src/add-ons/accelerants/radeon/monitor_detection.c | 2 +-
src/bin/hey.cpp | 2 +-
src/tools/fs_shell/block_cache.cpp | 2 +-
############################################################################
Commit: ee056a089cd9e6433456fea4dd3af1a85a148327
URL: http://cgit.haiku-os.org/haiku/commit/?id=ee056a089cd9
Author: Philippe Saint-Pierre <stpere@xxxxxxxxx>
Date: Thu Jul 2 00:34:57 2015 UTC
match new[] operator with delete[] operator
The string ends up being deleted with the [] variant later on.
CID 602975.
----------------------------------------------------------------------------
diff --git a/src/bin/hey.cpp b/src/bin/hey.cpp
index a086c5d..646a6a5 100644
--- a/src/bin/hey.cpp
+++ b/src/bin/hey.cpp
@@ -1168,7 +1168,7 @@ format_data(int32 type, char *ptr, long size)
char *tempstr;
if (size <= 0L) {
- str = new char;
+ str = new char[1];
*str = 0;
return str;
}
############################################################################
Commit: f4a699af83d69eb4ca703d728d949059f3613028
URL: http://cgit.haiku-os.org/haiku/commit/?id=f4a699af83d6
Author: Philippe Saint-Pierre <stpere@xxxxxxxxx>
Date: Thu Jul 2 01:19:12 2015 UTC
CID 1273539: Use right variable in construction check
----------------------------------------------------------------------------
diff --git a/src/tools/fs_shell/block_cache.cpp
b/src/tools/fs_shell/block_cache.cpp
index f51e21b..72a6268 100644
--- a/src/tools/fs_shell/block_cache.cpp
+++ b/src/tools/fs_shell/block_cache.cpp
@@ -1166,7 +1166,7 @@ fssh_cache_detach_sub_transaction(void* _cache, int32_t
id,
// create a new transaction for the sub transaction
cache_transaction* newTransaction = new(nothrow) cache_transaction;
- if (transaction == NULL)
+ if (newTransaction == NULL)
return FSSH_B_NO_MEMORY;
newTransaction->id = fssh_atomic_add(&cache->next_transaction_id, 1);
############################################################################
Revision: hrev49349
Commit: 494fe5a431e984444293be8469d0d96bd0303574
URL: http://cgit.haiku-os.org/haiku/commit/?id=494fe5a431e9
Author: Philippe Saint-Pierre <stpere@xxxxxxxxx>
Date: Thu Jul 2 01:26:00 2015 UTC
CID 1273484: Use bitwise operator to verify bitmask
----------------------------------------------------------------------------
diff --git a/src/add-ons/accelerants/radeon/monitor_detection.c
b/src/add-ons/accelerants/radeon/monitor_detection.c
index 8a9b78b..abfd9f4 100644
--- a/src/add-ons/accelerants/radeon/monitor_detection.c
+++ b/src/add-ons/accelerants/radeon/monitor_detection.c
@@ -1112,7 +1112,7 @@ Radeon_DetectDisplays(accelerator_info *ai)
displays |= dd_tv_crt;
// check TV-out connector
- if ((controlled_displays && (dd_ctv | dd_stv)) != 0)
+ if ((controlled_displays & (dd_ctv | dd_stv)) != 0)
displays |= Radeon_DetectTV(ai, (displays & dd_tv_crt) != 0);
SHOW_INFO(0, "Detected monitors: 0x%x", displays);