summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-08-01 05:05:59 +0200
committerLennart Poettering <lennart@poettering.net>2011-08-01 05:05:59 +0200
commit3bfc71846c3eac9011f0182b0c8d5639a9549228 (patch)
treeeca2ab856c7993a19444db42d2e02ce08db92786 /src
parentb636465bc0190448f960791cd059c4dd1fa37717 (diff)
util: place a couple of _likely_ around cache TLS vars
Diffstat (limited to 'src')
-rw-r--r--src/cgroup-util.c2
-rw-r--r--src/util.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/cgroup-util.c b/src/cgroup-util.c
index 8e574bf98a..fd0ac98e28 100644
--- a/src/cgroup-util.c
+++ b/src/cgroup-util.c
@@ -488,7 +488,7 @@ int cg_get_path(const char *controller, const char *path, const char *suffix, ch
assert(controller);
assert(fs);
- if (!good) {
+ if (_unlikely_(!good)) {
int r;
r = path_is_mount_point("/sys/fs/cgroup");
diff --git a/src/util.c b/src/util.c
index 4e2a4fab83..8d54049754 100644
--- a/src/util.c
+++ b/src/util.c
@@ -73,7 +73,7 @@ size_t page_size(void) {
static __thread size_t pgsz = 0;
long r;
- if (pgsz)
+ if (_likely_(pgsz))
return pgsz;
assert_se((r = sysconf(_SC_PAGESIZE)) > 0);
@@ -3768,7 +3768,7 @@ int columns(void) {
static __thread int parsed_columns = 0;
const char *e;
- if (parsed_columns > 0)
+ if (_likely_(parsed_columns > 0))
return parsed_columns;
if ((e = getenv("COLUMNS")))
@@ -4364,7 +4364,7 @@ int detect_virtualization(const char **id) {
const char *_id;
int r;
- if (cached_id) {
+ if (_likely_(cached_id)) {
if (cached_id == (const char*) -1)
return 0;