[maemo-commits] [maemo-commits] r8428 - projects/haf/trunk/maemo-launcher/launcher
From: www-data at stage.maemo.org www-data at stage.maemo.orgDate: Tue Nov 28 23:55:14 EET 2006
- Previous message: [maemo-commits] r8427 - in projects/haf/trunk/maemo-launcher: . debian launcher
- Next message: [maemo-commits] r8429 - in projects/haf/trunk/maemo-launcher: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: guillem
Date: 2006-11-28 23:55:13 +0200 (Tue, 28 Nov 2006)
New Revision: 8428
Modified:
projects/haf/trunk/maemo-launcher/launcher/booster.c
projects/haf/trunk/maemo-launcher/launcher/invoker.c
projects/haf/trunk/maemo-launcher/launcher/summoner.c
Log:
Bah, check for negative values from asprintf.
Modified: projects/haf/trunk/maemo-launcher/launcher/booster.c
===================================================================
--- projects/haf/trunk/maemo-launcher/launcher/booster.c 2006-11-28 21:10:40 UTC (rev 8427)
+++ projects/haf/trunk/maemo-launcher/launcher/booster.c 2006-11-28 21:55:13 UTC (rev 8428)
@@ -35,14 +35,11 @@
char *booster_path;
char *booster_sym;
char *error_s;
- int err;
- err = asprintf(&booster_path, BOOSTER_DIR "/booster-%s.so", booster->name);
- if (err)
+ if (asprintf(&booster_path, BOOSTER_DIR "/booster-%s.so", booster->name) < 0)
die(40, "allocating booster module path\n");
- err = asprintf(&booster_sym, "booster_%s_api", booster->name);
- if (err)
+ if (asprintf(&booster_sym, "booster_%s_api", booster->name) < 0)
die(40, "allocating booster symbol path\n");
/* Load the booster module. */
Modified: projects/haf/trunk/maemo-launcher/launcher/invoker.c
===================================================================
--- projects/haf/trunk/maemo-launcher/launcher/invoker.c 2006-11-28 21:10:40 UTC (rev 8427)
+++ projects/haf/trunk/maemo-launcher/launcher/invoker.c 2006-11-28 21:55:13 UTC (rev 8428)
@@ -358,7 +358,7 @@
{
/* Called with a different name. Add the proper extension and launch it.
* Do not try to parse any arguments. */
- if (asprintf(&launch, "%s.launch", argv[0]) == -1)
+ if (asprintf(&launch, "%s.launch", argv[0]) < 0)
die(1, "allocating program name buffer");
prog_name = launch;
prog_argc = argc;
Modified: projects/haf/trunk/maemo-launcher/launcher/summoner.c
===================================================================
--- projects/haf/trunk/maemo-launcher/launcher/summoner.c 2006-11-28 21:10:40 UTC (rev 8427)
+++ projects/haf/trunk/maemo-launcher/launcher/summoner.c 2006-11-28 21:55:13 UTC (rev 8428)
@@ -104,7 +104,7 @@
/* Called with a different name. Add the proper extension and launch it.
* Do not try to parse any arguments. */
- if (asprintf(&launch, "%s.launch", argv[0]) == -1)
+ if (asprintf(&launch, "%s.launch", argv[0]) < 0)
die(1, "allocating program name buffer");
prog.filename = launch;
prog.argc = argc;
- Previous message: [maemo-commits] r8427 - in projects/haf/trunk/maemo-launcher: . debian launcher
- Next message: [maemo-commits] r8429 - in projects/haf/trunk/maemo-launcher: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
