]> granicus.if.org Git - php/commitdiff
MFH: string format stuff.
authorIlia Alshanetsky <iliaa@php.net>
Mon, 22 Sep 2003 23:28:09 +0000 (23:28 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 22 Sep 2003 23:28:09 +0000 (23:28 +0000)
ext/exif/exif.c
ext/mysql/php_mysql.c
ext/sysvmsg/sysvmsg.c

index 82c154a3bb40d464d42bd1ae639940907ab3f873..c130fbc44a74f9f6bae91ab88bf96c5da99ff092 100644 (file)
@@ -243,10 +243,10 @@ static const char * EXIF_ERROR_CORRUPT   = "File structure corrupted";
 static const char * EXIF_ERROR_THUMBEOF  = "Thumbnail goes IFD boundary or end of file reached";
 static const char * EXIF_ERROR_FSREALLOC = "Illegal reallocating of undefined file section";
 
-#define EXIF_ERRLOG_FILEEOF    php_error_docref(NULL TSRMLS_CC, E_WARNING, EXIF_ERROR_FILEEOF);
-#define EXIF_ERRLOG_CORRUPT    php_error_docref(NULL TSRMLS_CC, E_WARNING, EXIF_ERROR_CORRUPT);
-#define EXIF_ERRLOG_THUMBEOF   php_error_docref(NULL TSRMLS_CC, E_WARNING, EXIF_ERROR_THUMBEOF);
-#define EXIF_ERRLOG_FSREALLOC  php_error_docref(NULL TSRMLS_CC, E_WARNING, EXIF_ERROR_FSREALLOC);
+#define EXIF_ERRLOG_FILEEOF    php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", EXIF_ERROR_FILEEOF);
+#define EXIF_ERRLOG_CORRUPT    php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", EXIF_ERROR_CORRUPT);
+#define EXIF_ERRLOG_THUMBEOF   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", EXIF_ERROR_THUMBEOF);
+#define EXIF_ERRLOG_FSREALLOC  php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", EXIF_ERROR_FSREALLOC);
 /* }}} */
 
 /* {{{ format description defines
index e601a6d7084c1f0a399e25ad0e7f4f38574a5bd7..049ec01f6c8a6d55d4960e4608e73d78f19de8e5 100644 (file)
@@ -437,9 +437,7 @@ PHP_RSHUTDOWN_FUNCTION(mysql)
 {
        if (MySG(trace_mode)) {
                if (MySG(result_allocated)){
-                       char tmp[128];
-                       sprintf((char *)&tmp, "%lu result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query()", MySG(result_allocated));
-                       php_error_docref("function.mysql-free-result" TSRMLS_CC, E_WARNING, tmp);
+                       php_error_docref("function.mysql-free-result" TSRMLS_CC, E_WARNING, "%lu result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query()", MySG(result_allocated));
                }
        }
 
@@ -1239,7 +1237,7 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link
                        mysql_real_query(&mysql->conn, newquery, strlen(newquery));
                        efree (newquery);
                        if (mysql_errno(&mysql->conn)) {
-                               php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, mysql_error(&mysql->conn));
+                               php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, "%s", mysql_error(&mysql->conn));
                                RETURN_FALSE;
                        }
                        else {
@@ -1262,7 +1260,7 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link
                /* check possible error */
                if (MySG(trace_mode)){
                        if (mysql_errno(&mysql->conn)){
-                               php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, mysql_error(&mysql->conn)); 
+                               php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, "%s", mysql_error(&mysql->conn)); 
                        }
                }
                RETURN_FALSE;
index 1c03f8146ea54b595c8dc5811d281f2889b8243b..1a3b6bb8cabc35b1b6041c66802190a2c19350fc 100644 (file)
@@ -223,7 +223,7 @@ PHP_FUNCTION(msg_get_queue)
                /* doesn't already exist; create it */
                mq->id = msgget(key, IPC_CREAT|IPC_EXCL|perms);
                if (mq->id < 0) {
-                       zend_error(E_WARNING, "%s: msgget() failed for key 0x%x: %s",
+                       zend_error(E_WARNING, "%s: msgget() failed for key 0x%lx: %s",
                                        get_active_function_name(TSRMLS_C), key, strerror(errno));
                        efree(mq);
                        RETURN_FALSE;