Re: [Rpm-maint] [rpm-software-management/rpm] Adopt language-specific %build_fooflags macros from Fedora (9a50846)

2019-06-06 Thread Michael Schroeder
But shouldn't that be `%{?build_ldflags}` as the ldflags line is commented out?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/commit/9a50846ceeef2add2344dd463c5562bd69496a23#commitcomment-33838263___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-06 Thread Panu Matilainen
pmatilai commented on this pull request.



> @@ -130,8 +130,7 @@ static int dateToTimet(const char * datestr, time_t * 
> secs, int * date_words)
SKIPNONSPACE(pe);
if (*pe != '\0')
   *pe++ = '\0';
-   if (((int)(pe-p) + 1) > 9 )
-  goto exit;
+   tz_name = xmalloc((int)(pe-p)+1);
strncpy(tz_name, p, (int)(pe-p));
tz_name[(int)(pe-p)] = '\0';

Oh and the casts are unnecessary here anyway. Never cast unless you really, 
really have to, and even then there's usually a better way.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/739#discussion_r291095629___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-06 Thread Panu Matilainen
pmatilai commented on this pull request.



> @@ -130,8 +130,7 @@ static int dateToTimet(const char * datestr, time_t * 
> secs, int * date_words)
SKIPNONSPACE(pe);
if (*pe != '\0')
   *pe++ = '\0';
-   if (((int)(pe-p) + 1) > 9 )
-  goto exit;
+   tz_name = xmalloc((int)(pe-p)+1);
strncpy(tz_name, p, (int)(pe-p));
tz_name[(int)(pe-p)] = '\0';

The same pe-p calculation is done several times here with cases and all. Use a 
helper variable in a case like this.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/739#pullrequestreview-246454941___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-06 Thread Panu Matilainen
pmatilai commented on this pull request.



> @@ -185,6 +184,8 @@ static int dateToTimet(const char * datestr, time_t * 
> secs, int * date_words)
 rc = 0;
 
 exit:
+if (tz_name)

Don't bother testing for NULL, free() does it anyway so it ends up being just 
useless clutter.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/739#pullrequestreview-246454330___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-06 Thread pavlinamv
pavlinamv commented on this pull request.



> @@ -30,10 +30,12 @@ static int sameDate(const struct tm *ot, const struct tm 
> *nt)
ot->tm_wday == nt->tm_wday);
 }
 
+#define TZ_MAX_LENGTH 80

Thank you. In the new version dynamic allocation is used.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/739#discussion_r291067663___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-06 Thread Panu Matilainen
pmatilai commented on this pull request.



> @@ -30,10 +30,12 @@ static int sameDate(const struct tm *ot, const struct tm 
> *nt)
ot->tm_wday == nt->tm_wday);
 }
 
+#define TZ_MAX_LENGTH 80

Just use dynamic allocation to avoid arbitrary limits that need explanations :)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/739#discussion_r291031793___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint