[glib: 4/10] gio-launch-desktop: Fix a compiler warning
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 4/10] gio-launch-desktop: Fix a compiler warning
- Date: Sun, 24 Jul 2022 23:31:32 +0000 (UTC)
commit e4e21f20e2539a43d3c01af2443b6d4d141d6593
Author: Simon McVittie <smcv collabora com>
Date: Thu Jul 14 14:59:54 2022 +0100
gio-launch-desktop: Fix a compiler warning
Signed-off-by: Simon McVittie <smcv collabora com>
gio/gio-launch-desktop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/gio-launch-desktop.c b/gio/gio-launch-desktop.c
index c034f76095..405e8c9119 100644
--- a/gio/gio-launch-desktop.c
+++ b/gio/gio-launch-desktop.c
@@ -44,7 +44,7 @@ main (int argc, char *argv[])
return -1;
r = snprintf (buf, sizeof (buf), "GIO_LAUNCHED_DESKTOP_FILE_PID=%ld", (long) pid);
- if (r >= sizeof (buf))
+ if (r < 0 || (size_t) r >= sizeof (buf))
return -1;
putenv (buf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]