[v1] alfred: Formatting patch for sync-period casts

Message ID 1485483789-5327-1-git-send-email-jhaws@sdl.usu.edu (mailing list archive)
State Accepted, archived
Commit c73e56c594e9de4c4586945c929db0f7acac90ac
Delegated to: Simon Wunderlich
Headers

Commit Message

Jonathan Haws Jan. 27, 2017, 2:23 a.m. UTC
  ---
 main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Simon Wunderlich Jan. 27, 2017, 2:10 p.m. UTC | #1
Thanks Jonathan,

I've added your sign-off manually (but only this time, since its so trivial! 
please don't forget it on other patches) and adjusted the subject. The patch 
can be found in revision c73e56c.

Thanks,
     Simon

On Thursday, January 26, 2017 7:23:09 PM CET Jonathan Haws wrote:
> ---
>  main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/main.c b/main.c
> index 1cabe15..446eecf 100644
> --- a/main.c
> +++ b/main.c
> @@ -276,8 +276,8 @@ static struct globals *alfred_init(int argc, char
> *argv[]) return NULL;
>  		case 'p':
>  			sync_period = strtod(optarg, NULL);
> -			globals->sync_period.tv_sec = (int) sync_period;
> -			globals->sync_period.tv_nsec = (double) (sync_period - (int)
> sync_period) * 1e9; +			globals->sync_period.tv_sec = (int)sync_period;
> +			globals->sync_period.tv_nsec = (double)(sync_period - 
(int)sync_period)
> * 1e9; printf(" ** Setting sync interval to: %.9f seconds (%ld.%09ld)\n",
> sync_period, globals->sync_period.tv_sec, globals->sync_period.tv_nsec);
> break;
>  		case '4':
  
Jonathan Haws Jan. 27, 2017, 3:30 p.m. UTC | #2
> I've added your sign-off manually (but only this time, since its so

> trivial! 

> please don't forget it on other patches) and adjusted the subject.

> The patch 

> can be found in revision c73e56c.


Shoot - I knew I forgot something when I ran format-patch!  Thanks for
covering me. :)
  

Patch

diff --git a/main.c b/main.c
index 1cabe15..446eecf 100644
--- a/main.c
+++ b/main.c
@@ -276,8 +276,8 @@  static struct globals *alfred_init(int argc, char *argv[])
 			return NULL;
 		case 'p':
 			sync_period = strtod(optarg, NULL);
-			globals->sync_period.tv_sec = (int) sync_period;
-			globals->sync_period.tv_nsec = (double) (sync_period - (int) sync_period) * 1e9;
+			globals->sync_period.tv_sec = (int)sync_period;
+			globals->sync_period.tv_nsec = (double)(sync_period - (int)sync_period) * 1e9;
 			printf(" ** Setting sync interval to: %.9f seconds (%ld.%09ld)\n", sync_period, globals->sync_period.tv_sec, globals->sync_period.tv_nsec);
 			break;
 		case '4':