jjacky avatar jjacky committed 2308565

minor fixes

Comments (0)

Files changed (1)

     templates_t template;
     const char *unit;
     double      size_h;
-    replacement_t *replacements[6];
+    replacement_t *replacements[7];
     
     templates_t *t, *tt;
     /* tpl_upgrades is the ref/fallback for pretty much everything */
     t = config->tpl_upgrades;
+    tt = NULL;
     if (type & CHECK_UPGRADES)
     {
         tt = config->tpl_upgrades;
         tt = config->tpl_news;
     }
     /* set the templates to use */
-    template.title = (tt->title) ? tt->title : t->title;
-    template.package = (tt->package) ? tt->package : t->package;
-    template.sep = (tt->sep) ? tt->sep : t->sep;
+    template.title = (tt && tt->title) ? tt->title : t->title;
+    template.package = (tt && tt->package) ? tt->package : t->package;
+    template.sep = (tt && tt->sep) ? tt->sep : t->sep;
     /* watched-aur might have fallen back to aur, which itself needs to fallback */
     if (type & CHECK_WATCHED_AUR)
     {
         {
             GDateTime *now, *begin, *end, *next;
             gint year, month, day;
-            gboolean is_within_skip;
+            gboolean is_within_skip = FALSE;
             
             now = g_date_time_new_now_local ();
             /* create GDateTime for begin & end of skip period */
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.