diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2014-09-18 14:52:51 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2014-09-18 14:52:51 +0200 |
commit | d3bf01e1c5c60113d012537ee52f69515cf5ecb7 (patch) | |
tree | e36cb2d8a7f9dffabc652b8172b4599f86c955b8 /src/coordinator.c | |
parent | f8a83ea88eacf744f9bde5e3f96e29ad627ec2f5 (diff) | |
download | biruda-d3bf01e1c5c60113d012537ee52f69515cf5ecb7.tar.gz biruda-d3bf01e1c5c60113d012537ee52f69515cf5ecb7.tar.bz2 |
first /etc/os-release parser for system
Diffstat (limited to 'src/coordinator.c')
-rw-r--r-- | src/coordinator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/coordinator.c b/src/coordinator.c index 646d220..fb2d0fa 100644 --- a/src/coordinator.c +++ b/src/coordinator.c @@ -54,14 +54,14 @@ static void *coordinator_func( void *thread_data ) json_object *role = json_object_new_string( "coordinator" ); json_object_object_add( obj, "role", role ); char hostname[100]; - gethostname( hostname, 100 ); + gethostname( hostname, sizeof( hostname ) ); json_object *host = json_object_new_string( hostname ); json_object_object_add( obj, "host", host ); unsigned int nofCpus = system_available_cpus( ); json_object *cpus = json_object_new_int( nofCpus ); json_object_object_add( obj, "cpus", cpus ); char cpe_name[100]; - system_cpe_name( cpe_name, 100 ); + system_cpe_name( cpe_name, sizeof( cpe_name ) ); json_object *os = json_object_new_string( cpe_name ); json_object_object_add( obj, "os", os ); const char *msg = json_object_to_json_string( obj ); |