diff options
Diffstat (limited to 'src/xrdb.c')
| -rw-r--r-- | src/xrdb.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/xrdb.c b/src/xrdb.c index 7c9cd53fa8c..60dcdae080d 100644 --- a/src/xrdb.c +++ b/src/xrdb.c | |||
| @@ -75,18 +75,9 @@ x_get_customization_string (XrmDatabase db, const char *name, | |||
| 75 | sprintf (full_class, "%s.%s", class, "Customization"); | 75 | sprintf (full_class, "%s.%s", class, "Customization"); |
| 76 | 76 | ||
| 77 | result = x_get_string_resource (db, full_name, full_class); | 77 | result = x_get_string_resource (db, full_name, full_class); |
| 78 | 78 | return result ? xstrdup (result) : NULL; | |
| 79 | if (result) | ||
| 80 | { | ||
| 81 | char *copy = xmalloc (strlen (result) + 1); | ||
| 82 | strcpy (copy, result); | ||
| 83 | return copy; | ||
| 84 | } | ||
| 85 | else | ||
| 86 | return 0; | ||
| 87 | } | 79 | } |
| 88 | 80 | ||
| 89 | |||
| 90 | /* Expand all the Xt-style %-escapes in STRING, whose length is given | 81 | /* Expand all the Xt-style %-escapes in STRING, whose length is given |
| 91 | by STRING_LEN. Here are the escapes we're supposed to recognize: | 82 | by STRING_LEN. Here are the escapes we're supposed to recognize: |
| 92 | 83 | ||
| @@ -605,7 +596,7 @@ x_get_string_resource (XrmDatabase rdb, const char *name, const char *class) | |||
| 605 | if (x_get_resource (rdb, name, class, x_rm_string, &value)) | 596 | if (x_get_resource (rdb, name, class, x_rm_string, &value)) |
| 606 | return (char *) value.addr; | 597 | return (char *) value.addr; |
| 607 | 598 | ||
| 608 | return (char *) 0; | 599 | return 0; |
| 609 | } | 600 | } |
| 610 | 601 | ||
| 611 | /* Stand-alone test facilities. */ | 602 | /* Stand-alone test facilities. */ |
| @@ -655,10 +646,7 @@ main (int argc, char **argv) | |||
| 655 | displayname = "localhost:0.0"; | 646 | displayname = "localhost:0.0"; |
| 656 | 647 | ||
| 657 | lp = member ("-xrm", arg_list); | 648 | lp = member ("-xrm", arg_list); |
| 658 | if (! NIL (lp)) | 649 | resource_string = NIL (lp) ? 0 : car (cdr (lp)); |
| 659 | resource_string = car (cdr (lp)); | ||
| 660 | else | ||
| 661 | resource_string = (char *) 0; | ||
| 662 | 650 | ||
| 663 | lp = member ("-c", arg_list); | 651 | lp = member ("-c", arg_list); |
| 664 | if (! NIL (lp)) | 652 | if (! NIL (lp)) |