Hello community,

here is the log from the commit of package cpustat for openSUSE:Factory checked 
in at 2018-02-06 16:51:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cpustat (Old)
 and      /work/SRC/openSUSE:Factory/.cpustat.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cpustat"

Tue Feb  6 16:51:19 2018 rev:3 rq:573311 version:0.02.04

Changes:
--------
--- /work/SRC/openSUSE:Factory/cpustat/cpustat.changes  2017-05-18 
20:50:23.937657928 +0200
+++ /work/SRC/openSUSE:Factory/.cpustat.new/cpustat.changes     2018-02-06 
16:51:29.661494825 +0100
@@ -1,0 +2,9 @@
+Wed Jan 31 19:30:20 UTC 2018 - [email protected]
+
+- update to version 0.02.04
+  * Makefile: bump version
+  * Manual: update copyright year and manual date
+  * Add variable pid size handling.
+  * Voidify close/fclose calls
+
+-------------------------------------------------------------------

Old:
----
  cpustat-0.02.03.tar.gz

New:
----
  cpustat-0.02.04.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cpustat.spec ++++++
--- /var/tmp/diff_new_pack.rU8C7j/_old  2018-02-06 16:51:30.173470850 +0100
+++ /var/tmp/diff_new_pack.rU8C7j/_new  2018-02-06 16:51:30.177470663 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package cpustat
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 # Copyright (c) 2017, Martin Hauke <[email protected]>
 #
 # All modifications and additions to the file contributed by third parties
@@ -18,7 +18,7 @@
 
 
 Name:           cpustat
-Version:        0.02.03
+Version:        0.02.04
 Release:        0
 Summary:        Periodic cpu utilization statistics
 License:        GPL-2.0+

++++++ cpustat-0.02.03.tar.gz -> cpustat-0.02.04.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpustat-0.02.03/Makefile new/cpustat-0.02.04/Makefile
--- old/cpustat-0.02.03/Makefile        2017-04-15 08:18:13.000000000 +0200
+++ new/cpustat-0.02.04/Makefile        2018-01-31 11:52:34.000000000 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2011-2017 Canonical
+# Copyright (C) 2011-2018 Canonical
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
 # Author: Colin Ian King <[email protected]>
 #
 
-VERSION=0.02.03
+VERSION=0.02.04
 
 CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpustat-0.02.03/cpustat.8 
new/cpustat-0.02.04/cpustat.8
--- old/cpustat-0.02.03/cpustat.8       2017-04-15 08:18:13.000000000 +0200
+++ new/cpustat-0.02.04/cpustat.8       2018-01-31 11:52:34.000000000 +0100
@@ -188,7 +188,7 @@
 This manual page was written by Colin King <[email protected]>,
 for the Ubuntu project (but may be used by others).
 .SH COPYRIGHT
-Copyright \(co 2011-2017 Canonical Ltd.
+Copyright \(co 2011-2018 Canonical Ltd.
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpustat-0.02.03/cpustat.c 
new/cpustat-0.02.04/cpustat.c
--- old/cpustat-0.02.03/cpustat.c       2017-04-15 08:18:13.000000000 +0200
+++ new/cpustat-0.02.04/cpustat.c       2018-01-31 11:52:34.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2017 Canonical
+ * Copyright (C) 2011-2018 Canonical
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -214,7 +214,6 @@
        { 1e10, 1e9,  "GHz" },
        { 1e13, 1e12, "THz" },
        { 1e16, 1e15, "PHz" },
-       { -1.0, -1.0,  NULL }
 };
 
 /* seconds scale suffixes, secs, mins, hours, etc */
@@ -706,7 +705,7 @@
 static char *secs_to_str(const double secs)
 {
        static char buf[16];
-       int i;
+       size_t i;
 
        for (i = 0; i < 5; i++) {
                if (secs <= second_scales[i + 1].scale)
@@ -727,7 +726,7 @@
        time_t now = (time_t)time_now;
 
        if (UNLIKELY((now == ((time_t) -1)))) {
-               memset(tm, 0, sizeof(struct tm));
+               memset(tm, 0, sizeof(*tm));
        } else {
                (void)localtime_r(&now, tm);
        }
@@ -886,7 +885,7 @@
                 * a new info struct
                 */
                if (!info) {
-                       info = malloc(sizeof(pid_info_t));
+                       info = malloc(sizeof(*info));
                        new_info = true;
                }
 
@@ -978,7 +977,7 @@
         * list since time is assumed to be increasing
         */
        if (!found) {
-               if (UNLIKELY((sdl = malloc(sizeof(sample_delta_list_t))) == 
NULL)) {
+               if (UNLIKELY((sdl = malloc(sizeof(*sdl))) == NULL)) {
                        fprintf(stderr, "Cannot allocate sample delta list\n");
                        exit(EXIT_FAILURE);
                }
@@ -995,7 +994,7 @@
        }
 
        /* Now append the sdi onto the list */
-       if (UNLIKELY((sdi = malloc(sizeof(sample_delta_item_t))) == NULL)) {
+       if (UNLIKELY((sdi = malloc(sizeof(*sdi))) == NULL)) {
                fprintf(stderr, "Cannot allocate sample delta item\n");
                exit(EXIT_FAILURE);
        }
@@ -1047,7 +1046,7 @@
 {
        static char str[256];
        static char *hdrptr;
-       char *ptr = str;
+       char *ptr;
        int i;
 
        if (!hdrptr) {
@@ -1171,7 +1170,7 @@
        double first_time = -1.0;
 
        if (UNLIKELY((sorted_cpu_infos =
-            calloc(cpu_info_list_length, sizeof(cpu_info_t*))) == NULL)) {
+            calloc(cpu_info_list_length, sizeof(*sorted_cpu_infos))) == NULL)) 
{
                fprintf(stderr,
                        "Cannot allocate buffer for sorting cpu_infos\n");
                exit(EXIT_FAILURE);
@@ -1390,11 +1389,11 @@
                        return info;
        }
 
-       if (UNLIKELY((info = malloc(sizeof(cpu_info_t))) == NULL)) {
+       if (UNLIKELY((info = malloc(sizeof(*info))) == NULL)) {
                fprintf(stderr, "Cannot allocate CPU info\n");
                exit(EXIT_FAILURE);
        }
-       memcpy(info, new_info, sizeof(cpu_info_t));
+       memcpy(info, new_info, sizeof(*info));
 
        if ((new_info->cmdline == NULL) || (opt_flags & OPT_CMD_COMM)) {
                info->cmdline = info->comm;
@@ -1482,7 +1481,7 @@
 static void cpu_stat_free_contents(
        cpu_stat_t *cpu_stats[])        /* CPU stat hash table */
 {
-       int i;
+       size_t i;
 
        for (i = 0; i < TABLE_SIZE; i++) {
                cpu_stat_t *cs = cpu_stats[i];
@@ -1534,7 +1533,7 @@
                cs_new = cpu_stat_free_list;
                cpu_stat_free_list = cs_new->next;
        } else {
-               if (UNLIKELY((cs_new = malloc(sizeof(cpu_stat_t))) == NULL)) {
+               if (UNLIKELY((cs_new = malloc(sizeof(*cs_new))) == NULL)) {
                        fprintf(stderr,
                                "Out of memory allocating a cpu stat\n");
                        exit(1);
@@ -1608,7 +1607,7 @@
        cpu_stat_t *const cpu_stats_old[],      /* old CPU stats samples */
        cpu_stat_t *const cpu_stats_new[])      /* new CPU stats samples */
 {
-       int i;
+       size_t i;
        cpu_stat_t *sorted = NULL;
        const bool do_sample_add = (opt_flags & OPT_SAMPLES);
 
@@ -1683,7 +1682,7 @@
        FILE *fp;
        char buffer[4096];
 
-       memset(proc_stat, 0, sizeof(proc_stat_t));
+       memset(proc_stat, 0, sizeof(*proc_stat));
 
        fp = fopen("/proc/stat", "r");
        if (UNLIKELY(!fp))
@@ -1891,7 +1890,7 @@
  */
 static double cpu_freq_average(uint32_t max_cpus)
 {
-       unsigned int i, n = 0;
+       size_t i, n = 0;
        double total_freq = 0;
 
        for (i = 0; i < max_cpus; i++) {
@@ -1934,7 +1933,7 @@
        double scale = 1e18;
        size_t i;
 
-       for (i = 0; cpu_freq_scale[i].suffix; i++) {
+       for (i = 0; i < SIZEOF_ARRAY(cpu_freq_scale); i++) {
                if (freq < cpu_freq_scale[i].threshold) {
                        suffix = cpu_freq_scale[i].suffix;
                        scale = cpu_freq_scale[i].scale;
@@ -2253,8 +2252,9 @@
                exit(EXIT_FAILURE);
        }
 
-       cpu_stats_old = calloc(TABLE_SIZE, sizeof(cpu_stat_t*));
-       cpu_stats_new = calloc(TABLE_SIZE, sizeof(cpu_stat_t*));
+       cpu_stats_old = calloc(TABLE_SIZE, sizeof(*cpu_stats_old));
+       cpu_stats_new = calloc(TABLE_SIZE, sizeof(*cpu_stats_new));
+
        if (UNLIKELY(cpu_stats_old == NULL || cpu_stats_new == NULL)) {
                fprintf(stderr, "Cannot allocate CPU statistics tables\n");
                exit(EXIT_FAILURE);


Reply via email to