mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-22 01:20:26 +00:00
Merge remote branch 'mattst88/master'
This commit is contained in:
commit
ca0d578d29
13 changed files with 22 additions and 64 deletions
|
|
@ -1267,7 +1267,7 @@ xf86MsgVerb(MessageType type, int verb, const char *format, ...)
|
|||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
xf86VDrvMsgVerb(-1, type, verb, format, ap);
|
||||
LogVMessageVerb(type, verb, format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
|
|
@ -1278,7 +1278,7 @@ xf86Msg(MessageType type, const char *format, ...)
|
|||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
xf86VDrvMsgVerb(-1, type, 1, format, ap);
|
||||
LogVMessageVerb(type, 1, format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1046,11 +1046,6 @@ xf86PrintDefaultLibraryPath(void)
|
|||
int
|
||||
ddxProcessArgument(int argc, char **argv, int i)
|
||||
{
|
||||
/*
|
||||
* Note: can't use xalloc/xfree here because OsInit() hasn't been called
|
||||
* yet. Use malloc/free instead.
|
||||
*/
|
||||
|
||||
#define CHECK_FOR_REQUIRED_ARGUMENT() \
|
||||
if (((i + 1) >= argc) || (!argv[i + 1])) { \
|
||||
ErrorF("Required argument to %s not specified\n", argv[i]); \
|
||||
|
|
@ -1067,10 +1062,9 @@ ddxProcessArgument(int argc, char **argv, int i)
|
|||
{
|
||||
char *mp;
|
||||
CHECK_FOR_REQUIRED_ARGUMENT();
|
||||
mp = malloc(strlen(argv[i + 1]) + 1);
|
||||
mp = strdup(argv[i + 1]);
|
||||
if (!mp)
|
||||
FatalError("Can't allocate memory for ModulePath\n");
|
||||
strcpy(mp, argv[i + 1]);
|
||||
xf86ModulePath = mp;
|
||||
xf86ModPathFrom = X_CMDLINE;
|
||||
return 2;
|
||||
|
|
@ -1079,10 +1073,9 @@ ddxProcessArgument(int argc, char **argv, int i)
|
|||
{
|
||||
char *lf;
|
||||
CHECK_FOR_REQUIRED_ARGUMENT();
|
||||
lf = malloc(strlen(argv[i + 1]) + 1);
|
||||
lf = strdup(argv[i + 1]);
|
||||
if (!lf)
|
||||
FatalError("Can't allocate memory for LogFile\n");
|
||||
strcpy(lf, argv[i + 1]);
|
||||
xf86LogFile = lf;
|
||||
xf86LogFileFrom = X_CMDLINE;
|
||||
return 2;
|
||||
|
|
|
|||
|
|
@ -429,8 +429,7 @@ xf86XVInitAdaptors(
|
|||
pa->ddGetPortAttribute = xf86XVGetPortAttribute;
|
||||
pa->ddQueryBestSize = xf86XVQueryBestSize;
|
||||
pa->ddQueryImageAttributes = xf86XVQueryImageAttributes;
|
||||
if((pa->name = malloc(strlen(adaptorPtr->name) + 1)))
|
||||
strcpy(pa->name, adaptorPtr->name);
|
||||
pa->name = strdup(adaptorPtr->name);
|
||||
|
||||
if(adaptorPtr->nEncodings &&
|
||||
(pEncode = calloc(adaptorPtr->nEncodings, sizeof(XvEncodingRec)))) {
|
||||
|
|
@ -440,8 +439,7 @@ xf86XVInitAdaptors(
|
|||
{
|
||||
pe->id = encodingPtr->id;
|
||||
pe->pScreen = pScreen;
|
||||
if((pe->name = malloc(strlen(encodingPtr->name) + 1)))
|
||||
strcpy(pe->name, encodingPtr->name);
|
||||
pe->name = strdup(encodingPtr->name);
|
||||
pe->width = encodingPtr->width;
|
||||
pe->height = encodingPtr->height;
|
||||
pe->rate.numerator = encodingPtr->rate.numerator;
|
||||
|
|
@ -493,8 +491,7 @@ xf86XVInitAdaptors(
|
|||
pat->flags = attributePtr->flags;
|
||||
pat->min_value = attributePtr->min_value;
|
||||
pat->max_value = attributePtr->max_value;
|
||||
if((pat->name = malloc(strlen(attributePtr->name) + 1)))
|
||||
strcpy(pat->name, attributePtr->name);
|
||||
pat->name = strdup(attributePtr->name);
|
||||
}
|
||||
pa->nAttributes = adaptorPtr->nAttributes;
|
||||
pa->pAttributes = pAttribute;
|
||||
|
|
|
|||
Loading…
Reference in a new issue