summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authora1346054 <36859588+a1346054@users.noreply.github.com>2021-09-21 20:52:08 +0000
committera1346054 <36859588+a1346054@users.noreply.github.com>2021-09-21 21:03:14 +0000
commitaa9eb1006dbf3d02c51614f795f1b85aca5aa8e4 (patch)
treefad8b845d8ab0ca6a9b74339eec7bc7e0ff37790
parent14cf8d7ba8a917c9872d9952178d7c93f2e7b3c6 (diff)
downloadlibfaketime-aa9eb1006dbf3d02c51614f795f1b85aca5aa8e4.tar.gz
Fix codestyle deviations
-rw-r--r--src/faketime.c2
-rw-r--r--src/libfaketime.c14
2 files changed, 8 insertions, 8 deletions
diff --git a/src/faketime.c b/src/faketime.c
index 17356d5..a2faa66 100644
--- a/src/faketime.c
+++ b/src/faketime.c
@@ -114,7 +114,7 @@ int main (int argc, char **argv)
bool fake_pid = false;
const char *pid_val;
- while(curr_opt < argc)
+ while (curr_opt < argc)
{
if (0 == strcmp(argv[curr_opt], "-m"))
{
diff --git a/src/libfaketime.c b/src/libfaketime.c
index 6fc2dfd..4ce88ca 100644
--- a/src/libfaketime.c
+++ b/src/libfaketime.c
@@ -268,7 +268,7 @@ static sem_t *shared_sem = NULL;
/** Data shared among faketime-spawned processes */
static struct ft_shared_s *ft_shared = NULL;
-/** Storage format for timestamps written to file. Big endian.*/
+/** Storage format for timestamps written to file. Big endian. */
struct saved_timestamp
{
int64_t sec;
@@ -335,7 +335,7 @@ static struct timespec user_faked_time_timespec = {0, -1};
static bool user_faked_time_set = false;
static char user_faked_time_saved[BUFFERLEN] = {0};
-/* Fractional user offset provided through FAKETIME env. var.*/
+/* Fractional user offset provided through FAKETIME env. var. */
static struct timespec user_offset = {0, -1};
/* Speed up or slow down clock */
static double user_rate = 1.0;
@@ -1842,7 +1842,7 @@ timer_settime_common(timer_t_or_int timerid, int flags,
}
else if (dont_fake)
{
- /* cast away constness*/
+ /* cast away constness */
new_real_pt = (struct itimerspec *)new_value;
}
else
@@ -2484,7 +2484,7 @@ parse_modifiers:
else if (NULL != (tmp_time_fmt = strchr(user_faked_time, 'i')))
{
double tick_inc = atof(tmp_time_fmt + 1);
- /* increment time with every time() call*/
+ /* increment time with every time() call */
user_per_tick_inc.tv_sec = floor(tick_inc);
user_per_tick_inc.tv_nsec = (tick_inc - user_per_tick_inc.tv_sec) * SEC_TO_nSEC ;
user_per_tick_inc_set = true;
@@ -2966,7 +2966,7 @@ int read_config_file()
(faketimerc = fopen("/etc/faketimerc", "rt")) != NULL)
{
static char line[BUFFERLEN];
- while(fgets(line, BUFFERLEN, faketimerc) != NULL)
+ while (fgets(line, BUFFERLEN, faketimerc) != NULL)
{
if ((strlen(line) > 1) && (line[0] != ' ') &&
(line[0] != '#') && (line[0] != ';'))
@@ -3174,7 +3174,7 @@ int fake_clock_gettime(clockid_t clk_id, struct timespec *tp)
case FT_START_AT: /* User-specified offset */
if (user_per_tick_inc_set)
{
- /* increment time with every time() call*/
+ /* increment time with every time() call */
next_time(tp, &user_per_tick_inc);
}
else
@@ -3631,7 +3631,7 @@ int pthread_cond_timedwait_common(pthread_cond_t *cond, pthread_mutex_t *mutex,
CLOCK_MONOTONIC. */
#ifndef __ARM_ARCH
#ifndef FORCE_MONOTONIC_FIX
- if(clk_id == CLOCK_MONOTONIC)
+ if (clk_id == CLOCK_MONOTONIC)
timespecadd(&faketime, &tdiff_actual, &tp);
else
#endif