diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-05-03 12:14:38 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-05-03 12:17:31 -0700 |
commit | 74e17c23ae085026cb089cbbb89c56e890bb29c4 (patch) | |
tree | c175b0e22161a7e31a04f41834bb914b4e414e46 /src/dbusbind.c | |
parent | 57a1d378ff148328a65b70bb80c092dad58adac4 (diff) | |
download | emacs-74e17c23ae085026cb089cbbb89c56e890bb29c4.tar.gz |
Simplify xd_signature to pacify GCC 9
* src/dbusbind.c (xd_signature): Use simpler way to set up
the subsignature. This also pacifies GCC 9 on Fedora 30 x86-64.
Diffstat (limited to 'src/dbusbind.c')
-rw-r--r-- | src/dbusbind.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c index 0afae6b05ad..850d176c08f 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -346,7 +346,6 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object) int subtype; Lisp_Object elt; char const *subsig; - int subsiglen; char x[DBUS_MAXIMUM_SIGNATURE_LENGTH]; elt = object; @@ -430,10 +429,9 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object) elt = CDR_SAFE (XD_NEXT_VALUE (elt)); } - subsiglen = snprintf (signature, DBUS_MAXIMUM_SIGNATURE_LENGTH, - "%c%s", dtype, subsig); - if (! (0 <= subsiglen && subsiglen < DBUS_MAXIMUM_SIGNATURE_LENGTH)) - string_overflow (); + signature[0] = dtype; + signature[1] = '\0'; + xd_signature_cat (signature, subsig); break; case DBUS_TYPE_VARIANT: |