diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-11 13:20:49 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-02-23 09:26:58 +0200 |
commit | ba233e87efddf0a6751b35784dca1c805364ff3b (patch) | |
tree | 9d7c8a4256e688c2d47cb6ecf580ac196c4da2c0 /sal/rtl | |
parent | a2fa9e2468aa5c4fd4b610c5d0ebc8959e87a072 (diff) |
remove unnecessary parenthesis in return statements
found with
$ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;'
Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
Diffstat (limited to 'sal/rtl')
-rw-r--r-- | sal/rtl/alloc_arena.cxx | 26 | ||||
-rw-r--r-- | sal/rtl/alloc_cache.cxx | 28 | ||||
-rw-r--r-- | sal/rtl/alloc_global.cxx | 6 | ||||
-rw-r--r-- | sal/rtl/alloc_impl.hxx | 8 | ||||
-rw-r--r-- | sal/rtl/cmdargs.cxx | 2 | ||||
-rw-r--r-- | sal/rtl/digest.cxx | 24 | ||||
-rw-r--r-- | sal/rtl/random.cxx | 4 |
7 files changed, 49 insertions, 49 deletions
diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx index c733ecded529..b7447175039a 100644 --- a/sal/rtl/alloc_arena.cxx +++ b/sal/rtl/alloc_arena.cxx @@ -96,7 +96,7 @@ rtl_arena_segment_constructor (void * obj) QUEUE_START_NAMED(segment, s); QUEUE_START_NAMED(segment, f); - return (1); + return 1; } /** rtl_arena_segment_destructor() @@ -404,7 +404,7 @@ rtl_arena_hash_remove ( } } - return (segment); + return segment; } /* ================================================================= */ @@ -515,14 +515,14 @@ rtl_arena_segment_create ( QUEUE_INSERT_HEAD_NAMED(span, (*ppSegment), s); /* report success */ - return (1); + return 1; } rtl_arena_segment_put (arena, &span); } rtl_arena_segment_put (arena, ppSegment); } } - return (0); + return 0; } /** rtl_arena_segment_coalesce() @@ -709,7 +709,7 @@ rtl_arena_activate ( if (!(arena->m_qcache_ptr)) { /* out of memory */ - return (0); + return 0; } for (i = 1; i <= n; i++) { @@ -724,7 +724,7 @@ rtl_arena_activate ( QUEUE_INSERT_TAIL_NAMED(&(g_arena_list.m_arena_head), arena, arena_); RTL_MEMORY_LOCK_RELEASE(&(g_arena_list.m_lock)); } - return (arena); + return arena; } /** rtl_arena_deactivate() @@ -916,7 +916,7 @@ try_alloc: goto try_alloc; } } - return (result); + return result; } /** rtl_arena_destroy() @@ -1003,7 +1003,7 @@ SAL_CALL rtl_arena_alloc ( (*pSize) = size; } } - return (addr); + return addr; } /** rtl_arena_free() @@ -1151,9 +1151,9 @@ SAL_CALL rtl_machdep_alloc ( pArena->m_stats.m_mem_alloc += size; (*pSize) = size; - return (addr); + return addr; } - return (NULL); + return NULL; } /** rtl_machdep_free() @@ -1183,14 +1183,14 @@ rtl_machdep_pagesize() { #if defined(SAL_UNX) #if defined(FREEBSD) || defined(NETBSD) || defined(DRAGONFLY) - return ((sal_Size)getpagesize()); + return (sal_Size)getpagesize(); #else /* POSIX */ - return ((sal_Size)sysconf(_SC_PAGESIZE)); + return (sal_Size)sysconf(_SC_PAGESIZE); #endif /* xBSD || POSIX */ #elif defined(SAL_W32) SYSTEM_INFO info; GetSystemInfo (&info); - return ((sal_Size)(info.dwPageSize)); + return (sal_Size)info.dwPageSize; #endif /* (SAL_UNX || SAL_W32) */ } diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx index e85f7520ea16..d63ae65dbb42 100644 --- a/sal/rtl/alloc_cache.cxx +++ b/sal/rtl/alloc_cache.cxx @@ -171,7 +171,7 @@ rtl_cache_hash_insert ( bufctl->m_next = (*ppHead); (*ppHead) = bufctl; - return (bufctl->m_addr); + return bufctl->m_addr; } /** rtl_cache_hash_remove() @@ -221,7 +221,7 @@ rtl_cache_hash_remove ( } } - return (bufctl); + return bufctl; } /* ================================================================= */ @@ -241,7 +241,7 @@ rtl_cache_slab_constructor (void * obj, SAL_UNUSED_PARAMETER void *) QUEUE_START_NAMED(slab, slab_); slab->m_ntypes = 0; - return (1); + return 1; } /** rtl_cache_slab_destructor() @@ -299,7 +299,7 @@ rtl_cache_slab_create ( rtl_arena_free (cache->m_source, addr, size); } } - return (slab); + return slab; } /** rtl_cache_slab_destroy() @@ -418,7 +418,7 @@ rtl_cache_slab_alloc ( { /* out of memory */ RTL_MEMORY_LOCK_RELEASE(&(cache->m_slab_lock)); - return (0); + return 0; } bufctl->m_addr = slab->m_bp; @@ -463,7 +463,7 @@ rtl_cache_slab_alloc ( } RTL_MEMORY_LOCK_RELEASE(&(cache->m_slab_lock)); - return (addr); + return addr; } /** rtl_cache_slab_free() @@ -547,7 +547,7 @@ rtl_cache_magazine_constructor (void * obj, SAL_UNUSED_PARAMETER void *) mag->m_mag_size = RTL_CACHE_MAGAZINE_SIZE; mag->m_mag_used = 0; - return (1); + return 1; } /** rtl_cache_magazine_destructor() @@ -632,7 +632,7 @@ rtl_cache_depot_dequeue ( depot->m_curr_min = depot->m_mag_count; } } - return (mag); + return mag; } /** rtl_cache_depot_exchange_alloc() @@ -659,7 +659,7 @@ rtl_cache_depot_exchange_alloc ( assert((full == 0) || (full->m_mag_used > 0)); - return (full); + return full; } /** rtl_cache_depot_exchange_free() @@ -686,7 +686,7 @@ rtl_cache_depot_exchange_free ( assert((empty == 0) || (empty->m_mag_used == 0)); - return (empty); + return empty; } /** rtl_cache_depot_populate() @@ -742,7 +742,7 @@ rtl_cache_constructor (void * obj) /* depot layer */ (void)RTL_MEMORY_LOCK_INIT(&(cache->m_depot_lock)); - return (1); + return 1; } /** rtl_cache_destructor() @@ -1102,7 +1102,7 @@ try_alloc: goto try_alloc; } } - return (result); + return result; } /** rtl_cache_destroy() @@ -1129,7 +1129,7 @@ SAL_CALL rtl_cache_alloc ( void * obj = 0; if (cache == 0) - return (0); + return 0; if (alloc_mode == AMode_SYSTEM) { @@ -1507,7 +1507,7 @@ rtl_cache_wsupdate_all (void * arg) } RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock)); - return (0); + return 0; } /* ================================================================= * diff --git a/sal/rtl/alloc_global.cxx b/sal/rtl/alloc_global.cxx index a18527106f24..cff293c97083 100644 --- a/sal/rtl/alloc_global.cxx +++ b/sal/rtl/alloc_global.cxx @@ -129,7 +129,7 @@ try_alloc: } } } - return (p); + return p; } /* ================================================================= */ @@ -175,7 +175,7 @@ void * SAL_CALL rtl_reallocateMemory_CUSTOM (void * p, sal_Size n) SAL_THROW_EXT { rtl_freeMemory (p), p = 0; } - return (p); + return p; } #endif @@ -365,7 +365,7 @@ void * SAL_CALL rtl_allocateZeroMemory (sal_Size n) SAL_THROW_EXTERN_C() void * p = rtl_allocateMemory (n); if (p != 0) memset (p, 0, n); - return (p); + return p; } /* ================================================================= */ diff --git a/sal/rtl/alloc_impl.hxx b/sal/rtl/alloc_impl.hxx index 57ababe7de79..05ec242889a7 100644 --- a/sal/rtl/alloc_impl.hxx +++ b/sal/rtl/alloc_impl.hxx @@ -71,7 +71,7 @@ highbit(sal_Size n) int k = 1; if (n == 0) - return (0); + return 0; #if SAL_TYPES_SIZEOFLONG == 8 if (n & 0xffffffff00000000ul) k |= 32, n >>= 32; @@ -87,7 +87,7 @@ highbit(sal_Size n) if (n & 0x02) k++; - return (k); + return k; } /** lowbit(): find first bit set @@ -99,7 +99,7 @@ lowbit(sal_Size n) int k = 1; if (n == 0) - return (0); + return 0; #if SAL_TYPES_SIZEOFLONG == 8 if (!(n & 0xffffffff)) k |= 32, n >>= 32; @@ -114,7 +114,7 @@ lowbit(sal_Size n) k |= 2, n >>= 2; if (!(n & 0x1)) k++; - return (k); + return k; } /** Queue manipulation macros diff --git a/sal/rtl/cmdargs.cxx b/sal/rtl/cmdargs.cxx index f2d103fb48a8..ef9f9bde2ae3 100644 --- a/sal/rtl/cmdargs.cxx +++ b/sal/rtl/cmdargs.cxx @@ -88,7 +88,7 @@ oslProcessError SAL_CALL rtl_getAppCommandArg ( rtl_uString_assign( ppCommandArg, g_ppCommandArgs[nArg] ); result = osl_Process_E_None; } - return (result); + return result; } sal_uInt32 SAL_CALL rtl_getAppCommandArgCount() diff --git a/sal/rtl/digest.cxx b/sal/rtl/digest.cxx index 205db64f76b4..d8321fa9cada 100644 --- a/sal/rtl/digest.cxx +++ b/sal/rtl/digest.cxx @@ -382,7 +382,7 @@ rtlDigestError SAL_CALL rtl_digest_MD2 ( result = rtl_digest_getMD2 (&digest, pBuffer, nBufLen); memset (&digest, 0, sizeof (digest)); - return (result); + return result; } /* @@ -397,7 +397,7 @@ rtlDigest SAL_CALL rtl_digest_createMD2() SAL_THROW_EXTERN_C() pImpl->m_digest = __rtl_digest_MD2; __rtl_digest_initMD2 (&(pImpl->m_context)); } - return ((rtlDigest)pImpl); + return (rtlDigest)pImpl; } /* @@ -753,7 +753,7 @@ rtlDigestError SAL_CALL rtl_digest_MD5 ( result = rtl_digest_getMD5 (&digest, pBuffer, nBufLen); memset (&digest, 0, sizeof (digest)); - return (result); + return result; } /* @@ -768,7 +768,7 @@ rtlDigest SAL_CALL rtl_digest_createMD5() SAL_THROW_EXTERN_C() pImpl->m_digest = __rtl_digest_MD5; __rtl_digest_initMD5 (&(pImpl->m_context)); } - return ((rtlDigest)pImpl); + return (rtlDigest)pImpl; } /* @@ -1237,7 +1237,7 @@ rtlDigestError SAL_CALL rtl_digest_SHA ( result = rtl_digest_getSHA (&digest, pBuffer, nBufLen); memset (&digest, 0, sizeof (digest)); - return (result); + return result; } /* @@ -1252,7 +1252,7 @@ rtlDigest SAL_CALL rtl_digest_createSHA() SAL_THROW_EXTERN_C() pImpl->m_digest = __rtl_digest_SHA_0; __rtl_digest_initSHA (&(pImpl->m_context), __rtl_digest_updateSHA_0); } - return ((rtlDigest)pImpl); + return (rtlDigest)pImpl; } /* @@ -1427,7 +1427,7 @@ rtlDigestError SAL_CALL rtl_digest_SHA1 ( result = rtl_digest_getSHA1 (&digest, pBuffer, nBufLen); memset (&digest, 0, sizeof (digest)); - return (result); + return result; } /* @@ -1442,7 +1442,7 @@ rtlDigest SAL_CALL rtl_digest_createSHA1() SAL_THROW_EXTERN_C() pImpl->m_digest = __rtl_digest_SHA_1; __rtl_digest_initSHA (&(pImpl->m_context), __rtl_digest_updateSHA_1); } - return ((rtlDigest)pImpl); + return (rtlDigest)pImpl; } /* @@ -1670,7 +1670,7 @@ rtlDigestError SAL_CALL rtl_digest_HMAC_MD5 ( } memset (&digest, 0, sizeof (digest)); - return (result); + return result; } /* @@ -1685,7 +1685,7 @@ rtlDigest SAL_CALL rtl_digest_createHMAC_MD5() SAL_THROW_EXTERN_C() pImpl->m_digest = __rtl_digest_HMAC_MD5; __rtl_digest_initHMAC_MD5 (&(pImpl->m_context)); } - return ((rtlDigest)pImpl); + return (rtlDigest)pImpl; } /* @@ -1902,7 +1902,7 @@ rtlDigestError SAL_CALL rtl_digest_HMAC_SHA1 ( } memset (&digest, 0, sizeof (digest)); - return (result); + return result; } /* @@ -1917,7 +1917,7 @@ rtlDigest SAL_CALL rtl_digest_createHMAC_SHA1() SAL_THROW_EXTERN_C() pImpl->m_digest = __rtl_digest_HMAC_SHA1; __rtl_digest_initHMAC_SHA1 (&(pImpl->m_context)); } - return ((rtlDigest)pImpl); + return (rtlDigest)pImpl; } /* diff --git a/sal/rtl/random.cxx b/sal/rtl/random.cxx index 851dbffb1dda..912074eb789f 100644 --- a/sal/rtl/random.cxx +++ b/sal/rtl/random.cxx @@ -102,7 +102,7 @@ static double __rtl_random_data (RandomData_Impl *pImpl) ((double)(pImpl->m_nZ) / 30307.0) ); random -= ((double)((sal_uInt32)(random))); - return (random); + return random; } /* @@ -278,7 +278,7 @@ rtlRandomPool SAL_CALL rtl_random_createPool() SAL_THROW_EXTERN_C() pImpl = (RandomPool_Impl*)NULL; } } - return ((rtlRandomPool)pImpl); + return (rtlRandomPool)pImpl; } /* |